From 16977bc108b4b1b8a36d7ecb05174ec0ee64c1ba Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 21 Mar 2014 20:28:41 -0600 Subject: [PATCH] fix(api): sortTask positive on score route definition, not going next(). Fixes #3118 --- src/controllers/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/user.js b/src/controllers/user.js index 89643710d6..ba6105b581 100644 --- a/src/controllers/user.js +++ b/src/controllers/user.js @@ -57,7 +57,7 @@ api.score = function(req, res, next) { // Send error responses for improper API call if (!id) return res.json(400, {err: ':id required'}); if (direction !== 'up' && direction !== 'down') { - if (direction == 'unlink') return next(); + if (direction == 'unlink' || direction == 'sort') return next(); return res.json(400, {err: ":direction must be 'up' or 'down'"}); } // If exists already, score it