Bläddra i källkod

add permittedChannelsForEachCommand in slack

zahmis 4 år sedan
förälder
incheckning
d9ec37f67c
1 ändrade filer med 5 tillägg och 15 borttagningar
  1. 5 15
      packages/slackbot-proxy/src/controllers/slack.ts

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

@@ -209,21 +209,11 @@ export class SlackCtrl {
       // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
       // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
       const client = generateWebClient(botToken!);
       const client = generateWebClient(botToken!);
 
 
-      // HARDCORD;
-      // const permittedChannelsForEachCommand = {
-      //   create: ['srv'],
-      //   search: ['srv', 'admin'],
-      // };
-
-      console.log('hoge');
-      // console.log(relations);
-      // const relationMock = await this.relationMockRepository.findOne({
-      //   where: { installation },
-      // });
-      // const permittedChannelsForEachCommand = relationMock?.permittedChannelsForEachCommand;
-      // console.log(relationMock);
-      // console.log(permittedChannelsForEachCommand);
-      console.log('hogedone');
+      const relationMock = await this.relationMockRepository.findOne({
+        where: { installation },
+      });
+      const permittedChannelsForEachCommand = relationMock?.permittedChannelsForEachCommand;
+      console.log(permittedChannelsForEachCommand);
 
 
       return client.chat.postEphemeral({
       return client.chat.postEphemeral({
         text: 'Error occured.',
         text: 'Error occured.',