mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
more linting
This commit is contained in:
@@ -227,13 +227,22 @@ categoriesController.get = function(req, res, next) {
|
||||
};
|
||||
|
||||
categoriesController.notFound = function(req, res) {
|
||||
res.locals.isAPI ? res.status(404).json('not-found') : res.status(404).render('404');
|
||||
if (res.locals.isAPI) {
|
||||
res.status(404).json('not-found');
|
||||
} else {
|
||||
res.status(404).render('404');
|
||||
}
|
||||
};
|
||||
|
||||
categoriesController.notAllowed = function(req, res) {
|
||||
var uid = req.user ? req.user.uid : 0;
|
||||
|
||||
if (uid) {
|
||||
res.locals.isAPI ? res.status(403).json('not-allowed') : res.status(403).render('403');
|
||||
if (res.locals.isAPI) {
|
||||
res.status(403).json('not-allowed');
|
||||
} else {
|
||||
res.status(403).render('403');
|
||||
}
|
||||
} else {
|
||||
if (res.locals.isAPI) {
|
||||
req.session.returnTo = apiToRegular(req.url);
|
||||
|
||||
Reference in New Issue
Block a user