shared-code-user-score-task

This commit is contained in:
Victor Piousbox
2016-04-01 15:54:47 +00:00
parent 3089658cc7
commit e6e2c26a12
6 changed files with 226 additions and 9 deletions

View File

@@ -393,9 +393,6 @@ api.scoreTask = {
if (!task) throw new NotFound(res.t('taskNotFound'));
let wasCompleted = task.completed;
if (task.type === 'daily' || task.type === 'todo') {
task.completed = direction === 'up'; // TODO move into scoreTask
}
let delta = common.ops.scoreTask({task, user, direction}, req);
// Drop system (don't run on the client, as it would only be discarded since ops are sent to the API, not the results)