Просмотр исходного кода

modify parse to parseSlashCommand

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

+ 2 - 2
packages/slackbot-proxy/src/controllers/slack.ts

@@ -1,7 +1,7 @@
 import {
 import {
   BodyParams, Controller, Get, Inject, Post, Req, Res,
   BodyParams, Controller, Get, Inject, Post, Req, Res,
 } from '@tsed/common';
 } from '@tsed/common';
-import { parse } from '@growi/slack/src/utils/slash-command-parser';
+import { parseSlashCommand } from '@growi/slack/src/utils/slash-command-parser';
 import { Installation } from '~/entities/installation';
 import { Installation } from '~/entities/installation';
 import { Relation } from '~/entities/relation';
 import { Relation } from '~/entities/relation';
 import { Order } from '~/entities/order';
 import { Order } from '~/entities/order';
@@ -79,7 +79,7 @@ export class SlackCtrl {
     // Send response immediately to avoid opelation_timeout error
     // Send response immediately to avoid opelation_timeout error
     // See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events
     // See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events
 
 
-    const parsedBody = parse(body);
+    const parsedBody = parseSlashCommand(body);
     const executeGrowiCommand = this.growiCommandsMappings[parsedBody.growiCommandType];
     const executeGrowiCommand = this.growiCommandsMappings[parsedBody.growiCommandType];
     await executeGrowiCommand(body);
     await executeGrowiCommand(body);
     res.send();
     res.send();