Explorar el Código

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

Martin Filser hace 2 años
padre
commit
26e326a204

+ 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;