Move every Boards.findOne(idOrFirstObjectSelector, options) to the ReactiveCache

This commit is contained in:
Martin Filser 2023-02-04 16:57:56 +01:00
parent 06e374f0ff
commit 2c92524cf4
6 changed files with 15 additions and 13 deletions

View file

@ -1,3 +1,4 @@
import { ReactiveCache } from '/imports/reactiveCache';
// exporter maybe is broken since Gridfs introduced, add fs and path
import { createWorkbook } from './createWorkbook';
@ -33,7 +34,7 @@ class ExporterCardPDF {
};
_.extend(
result,
Boards.findOne(this._boardId, {
ReactiveCache.getBoard(this._boardId, {
fields: {
stars: 0,
},
@ -621,7 +622,7 @@ class ExporterCardPDF {
}
canExport(user) {
const board = Boards.findOne(this._boardId);
const board = ReactiveCache.getBoard(this._boardId);
return board && board.isVisibleBy(user);
}
}