From bf3f19253f17907b35a8c23357595047c692e57c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 13 May 2016 10:47:01 +0300 Subject: [PATCH] if post is not found go to 404 --- src/controllers/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/posts.js b/src/controllers/posts.js index c8b490f65b..be96fa7e43 100644 --- a/src/controllers/posts.js +++ b/src/controllers/posts.js @@ -12,7 +12,7 @@ postsController.redirectToPost = function(req, res, callback) { } posts.generatePostPath(pid, req.uid, function(err, path) { - if (err) { + if (err || !path) { return callback(err); }