Преглед на файлове

Move every Integrations.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory client/)

Martin Filser преди 2 години
родител
ревизия
26e326a204
променени са 2 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 2 2
      client/components/cards/cardDetails.js
  2. 2 1
      client/components/sidebar/sidebar.js

+ 2 - 2
client/components/cards/cardDetails.js

@@ -197,11 +197,11 @@ BlazeComponent.extendComponent({
         url: '',
       };
 
-      const integrations = Integrations.find({
+      const integrations = ReactiveCache.getIntegrations({
         boardId: { $in: [card.boardId, Integrations.Const.GLOBAL_WEBHOOK_ID] },
         enabled: true,
         activities: { $in: ['CardDetailsRendered', 'all'] },
-      }).fetch();
+      });
 
       if (integrations.length > 0) {
         integrations.forEach((integration) => {

+ 2 - 1
client/components/sidebar/sidebar.js

@@ -426,7 +426,8 @@ BlazeComponent.extendComponent({
   },
   integrations() {
     const boardId = this.boardId();
-    return Integrations.find({ boardId: `${boardId}` }).fetch();
+    const ret = ReactiveCache.getIntegrations({ boardId });
+    return ret;
   },
   types() {
     return Integrations.Const.WEBHOOK_TYPES;