|
@@ -1,11 +1,16 @@
|
|
|
|
|
+import { SlashCommand } from '@slack/bolt';
|
|
|
import { Service } from '@tsed/di';
|
|
import { Service } from '@tsed/di';
|
|
|
|
|
+import { parse } from '../../../slack/src/utils/slash-command-parser';
|
|
|
import { openRegisterModal } from './RegisterService';
|
|
import { openRegisterModal } from './RegisterService';
|
|
|
|
|
|
|
|
|
|
|
|
|
@Service()
|
|
@Service()
|
|
|
export class ReceiveService {
|
|
export class ReceiveService {
|
|
|
|
|
|
|
|
- receiveContentsFromSlack(body:{[key:string]:string}) : string {
|
|
|
|
|
|
|
+ receiveContentsFromSlack(body:SlashCommand) : string {
|
|
|
|
|
+ console.log(body);
|
|
|
|
|
+ const parseBody = parse(body);
|
|
|
|
|
+ console.log(parseBody);
|
|
|
if (body.text === 'register') {
|
|
if (body.text === 'register') {
|
|
|
openRegisterModal(body);
|
|
openRegisterModal(body);
|
|
|
|
|
|