mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
Closer to correct use of todoIds
This commit is contained in:
parent
6101a32b1b
commit
d9e8c8f42a
1 changed files with 2 additions and 2 deletions
|
|
@ -23,12 +23,12 @@ get '/', (page, model) ->
|
|||
getRoom = (page, model, userId) ->
|
||||
model.subscribe "users.#{userId}", (err, user) ->
|
||||
model.ref '_user', user
|
||||
todoIds = model.at '_user.todos.todoIds'
|
||||
todoIds = user.at 'todoIds'
|
||||
|
||||
# The refList supports array methods, but it stores the todo values
|
||||
# on an object by id. The todos are stored on the object 'todos',
|
||||
# and their order is stored in an array of ids at '_group.todoIds'
|
||||
model.refList '_todoList', "_user.todos", todoIds
|
||||
model.refList '_todoList', '_user.todos', '_user.todoIds'
|
||||
|
||||
# Add some default todos if this is a new group. Items inserted into
|
||||
# a refList will automatically get an 'id' property if not specified
|
||||
|
|
|
|||
Loading…
Reference in a new issue