mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
apiv2 make sure to handle empty object
This commit is contained in:
parent
b158e8896c
commit
af8b764a68
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue