mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Fixed linting and some tests
This commit is contained in:
@@ -14,7 +14,9 @@ module.exports = function sortTask (user, req = {}) {
|
||||
let fromParam = _.get(req, 'query.from');
|
||||
let taskType = _.get(req, 'params.taskType');
|
||||
|
||||
let index = _.findIndex(user[`${taskType}s`], function(task) {return task._id === id;});
|
||||
let index = _.findIndex(user[`${taskType}s`], function findById (task) {
|
||||
return task._id === id;
|
||||
});
|
||||
|
||||
if (index === -1) {
|
||||
throw new NotFound(i18n.t('messageTaskNotFound', req.language));
|
||||
|
||||
Reference in New Issue
Block a user