mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-05-22 13:48:37 +00:00
fix(api): sortTask positive on score route definition, not going
next(). Fixes #3118
This commit is contained in:
parent
0da696b861
commit
16977bc108
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue