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

@@ -8,7 +8,9 @@ module.exports = function deleteTask (user, req = {}) {
let tid = _.get(req, 'params.id');
let taskType = _.get(req, 'params.taskType');
let index = _.findIndex(user[`${taskType}s`], function(task) {return task._id === tid;});
let index = _.findIndex(user[`${taskType}s`], function findById (task) {
return task._id === tid;
});
if (index === -1) {
throw new NotFound(i18n.t('messageTaskNotFound', req.language));