mirror of
https://github.com/wekan/wekan.git
synced 2025-12-20 17:30:13 +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
|
|
@ -1,3 +1,5 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
|
||||
function getCardsBetween(idA, idB) {
|
||||
function pluckId(doc) {
|
||||
return doc._id;
|
||||
|
|
@ -13,7 +15,7 @@ function getCardsBetween(idA, idB) {
|
|||
}).map(pluckId);
|
||||
}
|
||||
|
||||
const cards = _.sortBy([Cards.findOne(idA), Cards.findOne(idB)], c => {
|
||||
const cards = _.sortBy([ReactiveCache.getCard(idA), ReactiveCache.getCard(idB)], c => {
|
||||
return c.sort;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue