if post is not found go to 404

v1.18.x
barisusakli 9 years ago
parent 9685290658
commit bf3f19253f

@ -12,7 +12,7 @@ postsController.redirectToPost = function(req, res, callback) {
} }
posts.generatePostPath(pid, req.uid, function(err, path) { posts.generatePostPath(pid, req.uid, function(err, path) {
if (err) { if (err || !path) {
return callback(err); return callback(err);
} }

Loading…
Cancel
Save