itizawa 4 лет назад
Родитель
Сommit
8c2138a0dd

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

@@ -34,10 +34,7 @@ export class GrowiToSlackCtrl {
   @Inject()
   orderRepository: OrderRepository;
 
-  async requestToGrowi(growiUrl?:string, proxyAccessToken?:string):Promise<void> {
-    if (growiUrl == null || proxyAccessToken == null) {
-      throw new Error('url and token is required');
-    }
+  async requestToGrowi(growiUrl:string, proxyAccessToken:string):Promise<void> {
     const url = new URL('/_api/v3/slack-integration/proxied/commands', growiUrl);
     await axios.post(url.toString(), {
       type: 'url_verification',

+ 6 - 6
packages/slackbot-proxy/src/entities/order.ts

@@ -21,14 +21,14 @@ export class Order {
   @Column({ nullable: true, default: false })
   isCompleted?: boolean;
 
-  @Column({ nullable: true })
-  growiUrl?: string;
+  @Column()
+  growiUrl: string;
 
-  @Column({ nullable: true })
-  growiAccessToken?: string;
+  @Column()
+  growiAccessToken: string;
 
-  @Column({ nullable: true })
-  proxyAccessToken?: string;
+  @Column()
+  proxyAccessToken: string;
 
   isExpired():boolean {
     // TODO GW-5555 implement this