Merge pull request #6962 from piousbox/shared-code-user-score-task

shared-code-user-score-task
This commit is contained in:
Matteo Pagliazzi
2016-04-01 18:28:55 +02:00
6 changed files with 226 additions and 9 deletions
-3
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)