mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Move every Boards.findOne(idOrFirstObjectSelector, options) to the ReactiveCache
This commit is contained in:
parent
06e374f0ff
commit
2c92524cf4
6 changed files with 15 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue