mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
use helper
This commit is contained in:
@@ -148,7 +148,7 @@ module.exports = function (middleware) {
|
|||||||
},
|
},
|
||||||
function (userslug) {
|
function (userslug) {
|
||||||
if (!userslug) {
|
if (!userslug) {
|
||||||
return res.status(401).send('not-authorized');
|
return controllers.helpers.notAllowed(req, res);
|
||||||
}
|
}
|
||||||
var path = req.path.replace(/^(\/api)?\/me/, '/user/' + userslug);
|
var path = req.path.replace(/^(\/api)?\/me/, '/user/' + userslug);
|
||||||
controllers.helpers.redirect(res, path);
|
controllers.helpers.redirect(res, path);
|
||||||
|
|||||||
Reference in New Issue
Block a user