fix(api): sortTask positive on score route definition, not going

next(). Fixes #3118
This commit is contained in:
Tyler Renelle 2014-03-21 20:28:41 -06:00
parent 0da696b861
commit 16977bc108

View file

@ -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