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';
import moment from 'moment/min/moment-with-locales';
import { TAPi18n } from '/imports/i18n';
import { createWorkbook } from './createWorkbook';
@ -35,7 +36,7 @@ class ExporterExcel {
};
_.extend(
result,
Boards.findOne(this._boardId, {
ReactiveCache.getBoard(this._boardId, {
fields: {
stars: 0,
},
@ -886,7 +887,7 @@ class ExporterExcel {
}
canExport(user) {
const board = Boards.findOne(this._boardId);
const board = ReactiveCache.getBoard(this._boardId);
return board && board.isVisibleBy(user);
}
}