Move every Cards.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory server/)

This commit is contained in:
Martin Filser 2023-03-12 11:25:15 +01:00
parent a533605608
commit 2a2ed1eb2c
3 changed files with 31 additions and 15 deletions

View file

@ -22,13 +22,17 @@ Meteor.publish('notificationAttachments', function() {
// gets all cards associated with activities associated with the current user
Meteor.publish('notificationCards', function() {
const ret = Cards.find({
_id: {
$in: activities()
.map(v => v.cardId)
.filter(v => !!v),
const ret = ReactiveCache.getCards(
{
_id: {
$in: activities()
.map(v => v.cardId)
.filter(v => !!v),
},
},
});
{},
true,
);
return ret;
});