use helper

v1.18.x
Barış Soner Uşaklı 7 years ago
parent ee398d3979
commit 7c1f8891a1

@ -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);

Loading…
Cancel
Save