Przeglądaj źródła

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

Martin Filser 2 lat temu
rodzic
commit
5eb4eb04c4
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      server/publications/cards.js

+ 2 - 2
server/publications/cards.js

@@ -427,7 +427,7 @@ function buildSelector(queryParams) {
           case PREDICATE_ATTACHMENT:
           case PREDICATE_ATTACHMENT:
             selector.$and.push({
             selector.$and.push({
               _id: {
               _id: {
-                $in: Attachments.find({}, { fields: { cardId: 1 } }).map(
+                $in: ReactiveCache.getAttachments({}, { fields: { cardId: 1 } }).map(
                   a => a.cardId,
                   a => a.cardId,
                 ),
                 ),
               },
               },
@@ -481,7 +481,7 @@ function buildSelector(queryParams) {
         { fields: { cardId: 1 } },
         { fields: { cardId: 1 } },
       );
       );
 
 
-      const attachments = Attachments.find({ 'original.name': regex });
+      const attachments = ReactiveCache.getAttachments({ 'original.name': regex });
 
 
       const comments = ReactiveCache.getCardComments(
       const comments = ReactiveCache.getCardComments(
         { text: regex },
         { text: regex },