From bed6d6c591983a1de7b56c465951702ca108caed Mon Sep 17 00:00:00 2001 From: Kai Lehmann Date: Tue, 17 Aug 2021 16:14:50 +0200 Subject: [PATCH] fixes global search, remove unnecessary use of CardCommentReactions --- server/publications/cards.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/publications/cards.js b/server/publications/cards.js index b2f3e7f3e..ce35aff2f 100644 --- a/server/publications/cards.js +++ b/server/publications/cards.js @@ -5,7 +5,6 @@ import Lists from '../../models/lists'; import Swimlanes from '../../models/swimlanes'; import Cards from '../../models/cards'; import CardComments from '../../models/cardComments'; -import CardCommentReactions from '../../models/cardCommentReactions'; import Attachments from '../../models/attachments'; import Checklists from '../../models/checklists'; import ChecklistItems from '../../models/checklistItems'; @@ -700,8 +699,6 @@ function findCards(sessionId, query) { type: 1, }; - const comments = CardComments.find({ cardId: { $in: cards.map(c => c._id) } }); - return [ cards, Boards.find( @@ -717,8 +714,7 @@ function findCards(sessionId, query) { Users.find({ _id: { $in: users } }, { fields: Users.safeFields }), Checklists.find({ cardId: { $in: cards.map(c => c._id) } }), Attachments.find({ cardId: { $in: cards.map(c => c._id) } }), - comments, - CardCommentReactions.find({cardCommentId: {$in: comments.map(c => c._id) }}), + CardComments.find({ cardId: { $in: cards.map(c => c._id) } }), SessionData.find({ userId, sessionId }), ]; }