fix(v3): cleanup of shared code

This commit is contained in:
Matteo Pagliazzi
2016-04-10 18:42:59 +02:00
parent 9027a9a907
commit c6879aa5df
4 changed files with 5 additions and 3 deletions

View File

@@ -124,6 +124,8 @@ api.score = function(req, res, next) {
task,
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)
if (direction === 'up') user.fns.randomDrop({task, delta}, req);
asyncM.parallel({
task: task.save.bind(task),