소스 검색

apply /interractive

zahmis 5 년 전
부모
커밋
d6e0760f83
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      src/server/routes/apiv3/slack-bot.js

+ 4 - 1
src/server/routes/apiv3/slack-bot.js

@@ -35,6 +35,7 @@ module.exports = (crowi) => {
   router.post('/', /* verificationRequestUrl, /* verificationAccessToken, */ async(req, res) => {
 
     verifyingIsSlackRequest(req, res, crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'));
+
     // Send response immediately to avoid opelation_timeout error
     // See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events
     res.send();
@@ -95,7 +96,9 @@ module.exports = (crowi) => {
     }
   };
 
-  router.post('/interactive', verificationRequestUrl, verifyingIsSlackRequest, async(req, res) => {
+  router.post('/interactive', verificationRequestUrl, async(req, res) => {
+
+    verifyingIsSlackRequest(req, res, crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'));
 
     // Send response immediately to avoid opelation_timeout error
     // See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events