mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
good-old racer unshift/push bug. gotta manually set the id list, works
like a charm :/
This commit is contained in:
parent
d17bd6fe90
commit
96b4f57adc
1 changed files with 3 additions and 1 deletions
|
|
@ -49,7 +49,9 @@ api.auth = (req, res, next) ->
|
||||||
addTask = (user, task, cb) ->
|
addTask = (user, task, cb) ->
|
||||||
task.type ?= 'habit'
|
task.type ?= 'habit'
|
||||||
tid = user.add "tasks", task, ->
|
tid = user.add "tasks", task, ->
|
||||||
user.unshift "#{task.type}Ids", tid, cb
|
ids = user.get "#{task.type}Ids"
|
||||||
|
ids.unshift tid
|
||||||
|
user.set "#{task.type}Ids", ids, cb
|
||||||
|
|
||||||
deleteTask = (user, task, cb) ->
|
deleteTask = (user, task, cb) ->
|
||||||
user.del "tasks.#{task.id}", ->
|
user.del "tasks.#{task.id}", ->
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue