mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-02 04:00:36 +00:00
Merge pull request #438 from crookedneighbor/prevent-type-changing
Prevent type changing
This commit is contained in:
commit
ce1c0d9008
2 changed files with 6861 additions and 6894 deletions
13753
dist/habitrpg-shared.js
vendored
13753
dist/habitrpg-shared.js
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -553,7 +553,7 @@ api.wrap = (user, main=true) ->
|
|||
|
||||
updateTask: (req, cb) ->
|
||||
return cb?({code:404,message:i18n.t('messageTaskNotFound', req.language)}) unless task = user.tasks[req.params?.id]
|
||||
_.merge task, _.omit(req.body,['checklist','id'])
|
||||
_.merge task, _.omit(req.body,['checklist','id', 'type'])
|
||||
task.checklist = req.body.checklist if req.body.checklist
|
||||
task.markModified? 'tags'
|
||||
cb? null, task
|
||||
|
|
|
|||
Loading…
Reference in a new issue