apiv2 make sure to handle empty object

This commit is contained in:
Tyler Renelle 2013-08-06 18:23:32 -04:00
parent b158e8896c
commit af8b764a68

View file

@ -59,6 +59,8 @@ router.post '/', api.auth, (req, res, next) ->
task = action.task ? {}
return done() if _.isEmpty(action)
switch action.op
when "score"
sendScore = -> api.score(model, user, task.id, action.dir, done)