zahmis 4 лет назад
Родитель
Сommit
7558e15f8f
1 измененных файлов с 5 добавлено и 14 удалено
  1. 5 14
      packages/slackbot-proxy/src/controllers/slack.ts

+ 5 - 14
packages/slackbot-proxy/src/controllers/slack.ts

@@ -232,21 +232,12 @@ export class SlackCtrl {
       const isCreate = canCreateArray.includes(body.channel_name);
       if (isCreate) {
         console.log('isCreate 内部');
-        console.log(growiCommand);
-
+        console.log(relations[0]);
         const relationsForBroadcastUse:RelationMock[] = [];
-
-        await Promise.all(relations.map(async(relation) => {
-          await this.relationsService.isSupportedGrowiCommandForBroadcastUse(relation, growiCommand.growiCommandType, baseDate);
-          relationsForBroadcastUse.push(relation);
-          console.log(relation);
-          // await this.relationMockRepository.update({ tokenGtop: relation.tokenGtoP }, { supportedCommandsForBroadcastUse: ['create'] });
-
-        }));
-
-        console.log(relationsForBroadcastUse);
-
-
+        body.permittedChannelsForEachCommand = relations[0].permittedChannelsForEachCommand;
+        relationsForBroadcastUse.push(relations[0]);
+        console.log(relations[0].permittedChannelsForEachCommand);
+        console.log(body);
         return this.sendCommand(growiCommand, relationsForBroadcastUse, body);
       }
     }