|
|
@@ -1,6 +1,7 @@
|
|
|
import {
|
|
|
BodyParams, Controller, Get, Inject, Post, Req, Res,
|
|
|
} from '@tsed/common';
|
|
|
+import { supportedGrowiCommandsMappings, supportedGrowiCommandsAction } from '@growi/slack/src/index';
|
|
|
import { Installation } from '~/entities/installation';
|
|
|
import { InstallationRepository } from '~/repositories/installation';
|
|
|
|
|
|
@@ -62,6 +63,10 @@ export class SlackCtrl {
|
|
|
// Send response immediately to avoid opelation_timeout error
|
|
|
// See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events
|
|
|
|
|
|
+ console.log(body.text);
|
|
|
+ const method = supportedGrowiCommandsMappings[body.text];
|
|
|
+ console.log(method);
|
|
|
+
|
|
|
const slackInput = this.receiveService.receiveContentsFromSlack(body);
|
|
|
console.log('Controller/events', slackInput);
|
|
|
res.send();
|