RecieveService.ts 515 B

12345678910111213141516171819
  1. import { Service } from '@tsed/di';
  2. import { parse } from '@growi/slack/src/utils/slash-command-parser';
  3. // import { openRegisterModal } from './RegisterService';
  4. @Service()
  5. export class ReceiveService {
  6. async receiveContentsFromSlack(body:{[key:string]:string}) : Promise<string> {
  7. const parseBody = parse(body);
  8. if (parseBody.growiCommandType === 'register') {
  9. // await openRegisterModal(body);
  10. return 'register action occurd';
  11. }
  12. return 'return receiveContentsFromSlack';
  13. }
  14. }