remove all changes from eslint --fix

This commit is contained in:
Matteo Pagliazzi
2016-03-08 17:45:14 +01:00
parent eeebe4c342
commit 5a2daabada
37 changed files with 224 additions and 223 deletions

View File

@@ -1,30 +1,30 @@
import i18n from '../i18n';
import preenTodos from '../libs/preenTodos';
module.exports = function (user, req, cb) {
module.exports = function(user, req, cb) {
var from, id, movedTask, preenedTasks, ref, task, tasks, to;
id = req.params.id;
ref = req.query, to = ref.to, from = ref.from;
task = user.tasks[id];
if (!task) {
return typeof cb === 'function' ? cb({
return typeof cb === "function" ? cb({
code: 404,
message: i18n.t('messageTaskNotFound', req.language)
}) : void 0;
}
if (!((to !== null) && (from !== null))) {
return typeof cb === 'function' ? cb('?to=__&from=__ are required') : void 0;
if (!((to != null) && (from != null))) {
return typeof cb === "function" ? cb('?to=__&from=__ are required') : void 0;
}
tasks = user[task.type + 's'];
tasks = user[task.type + "s"];
if (task.type === 'todo' && tasks[from] !== task) {
preenedTasks = preenTodos(tasks);
preenedTasks = api.preenTodos(tasks);
if (to !== -1) {
to = tasks.indexOf(preenedTasks[to]);
}
from = tasks.indexOf(preenedTasks[from]);
}
if (tasks[from] !== task) {
return typeof cb === 'function' ? cb({
return typeof cb === "function" ? cb({
code: 404,
message: i18n.t('messageTaskNotFound', req.language)
}) : void 0;
@@ -35,5 +35,5 @@ module.exports = function (user, req, cb) {
} else {
tasks.splice(to, 0, movedTask);
}
return typeof cb === 'function' ? cb(null, tasks) : void 0;
return typeof cb === "function" ? cb(null, tasks) : void 0;
};