itizawa 4 лет назад
Родитель
Сommit
2cc1e8e32c

+ 7 - 1
packages/slackbot-proxy/src/controllers/growi-to-slack.ts

@@ -24,6 +24,8 @@ import { injectGrowiUriToView } from '~/utils/injectGrowiUriToView';
 
 
 const logger = loggerFactory('slackbot-proxy:controllers:growi-to-slack');
 const logger = loggerFactory('slackbot-proxy:controllers:growi-to-slack');
 
 
+// temporarily save for selection to growi
+const temporarySinglePostCommands = ['create'];
 
 
 @Controller('/g2s')
 @Controller('/g2s')
 export class GrowiToSlackCtrl {
 export class GrowiToSlackCtrl {
@@ -159,7 +161,11 @@ export class GrowiToSlackCtrl {
 
 
     // Transaction is not considered because it is used infrequently,
     // Transaction is not considered because it is used infrequently,
     const createdRelation = await this.relationRepository.save({
     const createdRelation = await this.relationRepository.save({
-      installation: order.installation, tokenGtoP: order.tokenGtoP, tokenPtoG: order.tokenPtoG, growiUri: order.growiUrl,
+      installation: order.installation,
+      tokenGtoP: order.tokenGtoP,
+      tokenPtoG: order.tokenPtoG,
+      growiUri: order.growiUrl,
+      siglePostCommands: temporarySinglePostCommands,
     });
     });
 
 
     return res.send({ relation: createdRelation, slackBotToken: token });
     return res.send({ relation: createdRelation, slackBotToken: token });

+ 3 - 0
packages/slackbot-proxy/src/entities/relation.ts

@@ -30,4 +30,7 @@ export class Relation {
   @Column()
   @Column()
   growiUri: string;
   growiUri: string;
 
 
+  @Column('simple-array')
+  siglePostCommands: string[];
+
 }
 }