This commit is contained in:
barisusakli
2014-06-13 15:33:22 -04:00
parent ce1934e566
commit 4c2765a79c
10 changed files with 24 additions and 32 deletions

View File

@@ -88,7 +88,7 @@ middleware.checkPostIndex = function(req, res, next) {
postCount = parseInt(postCount, 10) + 1;
if (postIndex > postCount) {
return res.locals.isAPI ? res.json(302, '/topic/' + req.params.topic_id + '/' + req.params.slug + '/' + postCount) : res.redirect('/topic/' + req.params.topic_id + '/' + req.params.slug + '/' + postCount);
} else if (postIndex <= 1) {
} else if (postIndex < 1) {
return res.locals.isAPI ? res.json(302, '/topic/' + req.params.topic_id + '/' + req.params.slug) : res.redirect('/topic/' + req.params.topic_id + '/' + req.params.slug);
}
next();