Fixed linting and some tests

This commit is contained in:
Keith Holliday
2016-05-10 10:44:48 -05:00
parent a0939155c9
commit 632a1ebbf3
16 changed files with 64 additions and 42 deletions

View File

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