mirror of
https://github.com/wekan/wekan.git
synced 2026-03-10 23:52:34 +01:00
Move every Cards.findOne() to the ReactiveCache
This commit is contained in:
parent
a182482cfb
commit
3b65113d05
24 changed files with 96 additions and 87 deletions
|
|
@ -81,7 +81,7 @@ if (Meteor.isServer) {
|
|||
boardId: paramBoardId,
|
||||
});
|
||||
const board = ReactiveCache.getBoard(paramBoardId);
|
||||
const card = Cards.findOne(paramCardId);
|
||||
const card = ReactiveCache.getCard(paramCardId);
|
||||
if (board && card) {
|
||||
if (comment) {
|
||||
Lock.set(comment._id, newComment);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Meteor.methods({
|
|||
if (!watchableObj) throw new Meteor.Error('error-list-doesNotExist');
|
||||
board = watchableObj.board();
|
||||
} else if (watchableType === 'card') {
|
||||
watchableObj = Cards.findOne(id);
|
||||
watchableObj = ReactiveCache.getCard(id);
|
||||
if (!watchableObj) throw new Meteor.Error('error-card-doesNotExist');
|
||||
board = watchableObj.board();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue