zahmis 5 лет назад
Родитель
Сommit
1a3a9f150b
1 измененных файлов с 3 добавлено и 5 удалено
  1. 3 5
      src/server/routes/apiv3/slack-bot.js

+ 3 - 5
src/server/routes/apiv3/slack-bot.js

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