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

This commit is contained in:
Martin Filser 2023-03-12 11:55:40 +01:00
parent 76bd3bfe1d
commit 46840c9373
3 changed files with 13 additions and 8 deletions

View file

@ -221,7 +221,7 @@ Meteor.publishRelations('board', function(boardId, isArchived) {
),
function(boardId, board) {
this.cursor(ReactiveCache.getLists({ boardId, archived: isArchived }, {}, true));
this.cursor(Swimlanes.find({ boardId, archived: isArchived }));
this.cursor(ReactiveCache.getSwimlanes({ boardId, archived: isArchived }, {}, true));
this.cursor(Integrations.find({ boardId }));
this.cursor(CardCommentReactions.find({ boardId }));
this.cursor(

View file

@ -783,9 +783,10 @@ function findCards(sessionId, query) {
{ fields: { ...fields, labels: 1, color: 1 } },
true,
),
Swimlanes.find(
ReactiveCache.getSwimlanes(
{ _id: { $in: swimlanes } },
{ fields: { ...fields, color: 1 } },
true,
),
ReactiveCache.getLists({ _id: { $in: lists } }, { fields }, true),
CustomFields.find({ _id: { $in: customFieldIds } }),

View file

@ -90,13 +90,17 @@ Meteor.publish('notificationLists', function() {
// gets all swimlanes associated with activities associated with the current user
Meteor.publish('notificationSwimlanes', function() {
const ret = Swimlanes.find({
_id: {
$in: activities()
.map(v => v.swimlaneId)
.filter(v => !!v),
const ret = ReactiveCache.getSwimlanes(
{
_id: {
$in: activities()
.map(v => v.swimlaneId)
.filter(v => !!v),
},
},
});
{},
true,
);
return ret;
});