From 7c1f8891a1874f5297ab8c9f216352bb79c76366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 9 Dec 2017 12:25:27 -0500 Subject: [PATCH] use helper --- src/middleware/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/user.js b/src/middleware/user.js index d7b70377f6..e3123e6942 100644 --- a/src/middleware/user.js +++ b/src/middleware/user.js @@ -148,7 +148,7 @@ module.exports = function (middleware) { }, function (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); controllers.helpers.redirect(res, path);