mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Move every Lists.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)
This commit is contained in:
parent
4a8dcde8ee
commit
6a4b03324c
9 changed files with 22 additions and 24 deletions
|
|
@ -747,7 +747,7 @@ Boards.helpers({
|
|||
// sorted lists from newest to the oldest, by its creation date or its cards' last modification date
|
||||
const value = ReactiveCache.getCurrentUser()._getListSortBy();
|
||||
const sortKey = { starred: -1, [value[0]]: value[1] }; // [["starred",-1],value];
|
||||
return Lists.find(
|
||||
return ReactiveCache.getLists(
|
||||
{
|
||||
boardId: this._id,
|
||||
archived: false,
|
||||
|
|
@ -757,7 +757,7 @@ Boards.helpers({
|
|||
},
|
||||
|
||||
draggableLists() {
|
||||
return Lists.find({ boardId: this._id }, { sort: { sort: 1 } });
|
||||
return ReactiveCache.getLists({ boardId: this._id }, { sort: { sort: 1 } });
|
||||
},
|
||||
|
||||
/** returns the last list
|
||||
|
|
@ -769,7 +769,7 @@ Boards.helpers({
|
|||
},
|
||||
|
||||
nullSortLists() {
|
||||
return Lists.find({
|
||||
return ReactiveCache.getLists({
|
||||
boardId: this._id,
|
||||
archived: false,
|
||||
sort: { $eq: null },
|
||||
|
|
@ -1056,7 +1056,7 @@ Boards.helpers({
|
|||
query.$or = [{ title: regex }, { description: regex }];
|
||||
}
|
||||
|
||||
ret = Lists.find(query, projection);
|
||||
ret = ReactiveCache.getLists(query, projection);
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue