feat(archive_todo): update to archive todos
I thought this bit of code was in the other repo. So long as part 3 follows close behind this, there shouldn't be an issue
This commit is contained in:
+3
-1
@@ -485,7 +485,9 @@ api.wrap = (user, main=true) ->
|
||||
# ------
|
||||
|
||||
clearCompleted: (req, cb) ->
|
||||
_.remove user.todos, (t)-> t.completed and !t.challenge?.id
|
||||
user.todos = _.map user.todos, (t)->
|
||||
t.archived = true if t.completed and !t.challenge?.id
|
||||
t
|
||||
user.markModified? 'todos'
|
||||
cb? null, user.todos
|
||||
|
||||
|
||||
Reference in New Issue
Block a user