mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-02 04:00:36 +00:00
apiv2: unshift to tasks, rather than push
This commit is contained in:
parent
38d57cbc87
commit
a8e0015cbb
1 changed files with 1 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ NO_USER_FOUND = err: "No user found."
|
|||
addTask = (user, task, cb) ->
|
||||
task.type ?= 'habit'
|
||||
tid = user.add "tasks", task, ->
|
||||
user.push "#{task.type}Ids", tid, cb
|
||||
user.unshift "#{task.type}Ids", tid, cb
|
||||
|
||||
deleteTask = (user, task, cb) ->
|
||||
user.del "tasks.#{task.id}", ->
|
||||
|
|
|
|||
Loading…
Reference in a new issue