mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
Fix #730: id property ignored when updating task
When calling the user.updateTask function if there was an id in the body it would override the id from the request URI
This commit is contained in:
parent
c9d880f584
commit
887a0c3c8e
1 changed files with 1 additions and 1 deletions
|
|
@ -505,7 +505,7 @@ api.wrap = (user, main=true) ->
|
|||
|
||||
updateTask: (req, cb) ->
|
||||
return cb?({code:404,message:"Task not found"}) unless task = user.tasks[req.params?.id]
|
||||
_.merge task, _.omit(req.body,'checklist')
|
||||
_.merge task, _.omit(req.body,['checklist','id'])
|
||||
task.checklist = req.body.checklist if req.body.checklist
|
||||
task.markModified? 'tags'
|
||||
cb? null, task
|
||||
|
|
|
|||
Loading…
Reference in a new issue