mirror of
https://github.com/wekan/wekan.git
synced 2025-12-23 10:50:13 +01:00
fixes global search, remove unnecessary use of CardCommentReactions
This commit is contained in:
parent
b2652edf56
commit
bed6d6c591
1 changed files with 1 additions and 5 deletions
|
|
@ -5,7 +5,6 @@ import Lists from '../../models/lists';
|
||||||
import Swimlanes from '../../models/swimlanes';
|
import Swimlanes from '../../models/swimlanes';
|
||||||
import Cards from '../../models/cards';
|
import Cards from '../../models/cards';
|
||||||
import CardComments from '../../models/cardComments';
|
import CardComments from '../../models/cardComments';
|
||||||
import CardCommentReactions from '../../models/cardCommentReactions';
|
|
||||||
import Attachments from '../../models/attachments';
|
import Attachments from '../../models/attachments';
|
||||||
import Checklists from '../../models/checklists';
|
import Checklists from '../../models/checklists';
|
||||||
import ChecklistItems from '../../models/checklistItems';
|
import ChecklistItems from '../../models/checklistItems';
|
||||||
|
|
@ -700,8 +699,6 @@ function findCards(sessionId, query) {
|
||||||
type: 1,
|
type: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
const comments = CardComments.find({ cardId: { $in: cards.map(c => c._id) } });
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
cards,
|
cards,
|
||||||
Boards.find(
|
Boards.find(
|
||||||
|
|
@ -717,8 +714,7 @@ function findCards(sessionId, query) {
|
||||||
Users.find({ _id: { $in: users } }, { fields: Users.safeFields }),
|
Users.find({ _id: { $in: users } }, { fields: Users.safeFields }),
|
||||||
Checklists.find({ cardId: { $in: cards.map(c => c._id) } }),
|
Checklists.find({ cardId: { $in: cards.map(c => c._id) } }),
|
||||||
Attachments.find({ cardId: { $in: cards.map(c => c._id) } }),
|
Attachments.find({ cardId: { $in: cards.map(c => c._id) } }),
|
||||||
comments,
|
CardComments.find({ cardId: { $in: cards.map(c => c._id) } }),
|
||||||
CardCommentReactions.find({cardCommentId: {$in: comments.map(c => c._id) }}),
|
|
||||||
SessionData.find({ userId, sessionId }),
|
SessionData.find({ userId, sessionId }),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue