handle 404 first

v1.18.x
Barış Soner Uşaklı 7 years ago
parent 557dfd5b47
commit 5e6d8ea566

@ -26,12 +26,12 @@ postsController.redirectToPost = function (req, res, next) {
}, next);
},
function (results, next) {
if (!results.canRead) {
return helpers.notAllowed(req, res);
}
if (!results.path) {
return next();
}
if (!results.canRead) {
return helpers.notAllowed(req, res);
}
helpers.redirect(res, results.path);
},
], next);

Loading…
Cancel
Save