mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-22 15:33:13 +01:00
Revert "fix: restore old behaviour of empty json w/ 401 code in admin middleware" [breaking]
This reverts commit dda5d42610.
re: #11099
This commit is contained in:
@@ -81,7 +81,7 @@ middleware.checkPrivileges = helpers.try(async (req, res, next) => {
|
||||
}
|
||||
|
||||
if (res.locals.isAPI) {
|
||||
res.status(401).json({});
|
||||
controllers.helpers.formatApiResponse(401, res);
|
||||
} else {
|
||||
res.redirect(`${nconf.get('relative_path')}/login?local=1`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user