Kaynağa Gözat

fix ReceiveService.ts

zahmis 5 yıl önce
ebeveyn
işleme
03096f082c

+ 3 - 5
packages/slackbot-proxy/src/controllers/slack.ts

@@ -62,12 +62,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
 
-    const slackInput = this.receiveService.receive(body);
-    console.log('Controller', slackInput);
+    const slackInput = this.receiveService.receiveContentsFromSlack(body);
+    console.log('Controller/events', slackInput);
     res.send();
-    // console.log(body.text);
-    // const index = new IndexService();
-    // index.receiveBody(body);
+
     // console.log('body', body);
 
     return 'This action will be handled by bolt service.';

+ 1 - 1
packages/slackbot-proxy/src/services/RecieveService.ts

@@ -5,7 +5,7 @@ export class ReceiveService {
 
   receiveContentsFromSlack(body) {
     if (body.text === 'register') {
-      console.log(body);
+      return console.log('register action occured');
     }
     return;
   }