mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 01:28:49 +01:00
Move every Boards.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)
This commit is contained in:
parent
59ee616304
commit
f83ee124d0
5 changed files with 30 additions and 28 deletions
|
|
@ -170,25 +170,25 @@ CustomFields.allow({
|
|||
insert(userId, doc) {
|
||||
return allowIsAnyBoardMember(
|
||||
userId,
|
||||
Boards.find({
|
||||
ReactiveCache.getBoards({
|
||||
_id: { $in: doc.boardIds },
|
||||
}).fetch(),
|
||||
}),
|
||||
);
|
||||
},
|
||||
update(userId, doc) {
|
||||
return allowIsAnyBoardMember(
|
||||
userId,
|
||||
Boards.find({
|
||||
ReactiveCache.getBoards({
|
||||
_id: { $in: doc.boardIds },
|
||||
}).fetch(),
|
||||
}),
|
||||
);
|
||||
},
|
||||
remove(userId, doc) {
|
||||
return allowIsAnyBoardMember(
|
||||
userId,
|
||||
Boards.find({
|
||||
ReactiveCache.getBoards({
|
||||
_id: { $in: doc.boardIds },
|
||||
}).fetch(),
|
||||
}),
|
||||
);
|
||||
},
|
||||
fetch: ['userId', 'boardIds'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue