mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
pass in cron user as object, otherwise we're modifying a different user object
This commit is contained in:
parent
65f819046d
commit
ec17a5f379
1 changed files with 1 additions and 1 deletions
|
|
@ -322,7 +322,7 @@ api.updateUser = (req, res, next) ->
|
|||
api.cron = (req, res, next) ->
|
||||
{user} = req.habit
|
||||
misc.batchTxn req.getModel(), (uObj, paths) ->
|
||||
uObj = helpers.derbyUserToAPI(user)
|
||||
uObj = helpers.derbyUserToAPI(uObj, {asScope:false})
|
||||
algos.cron uObj, {paths}
|
||||
, {user, done:next, cron:true}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue