mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Move every Swimlanes.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory server/)
This commit is contained in:
parent
76bd3bfe1d
commit
46840c9373
3 changed files with 13 additions and 8 deletions
|
@ -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(
|
||||
|
|
|
@ -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 } }),
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue