apiv2: unshift to tasks, rather than push

This commit is contained in:
Tyler Renelle 2013-08-04 15:53:20 -04:00
parent 38d57cbc87
commit a8e0015cbb

View file

@ -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}", ->