zahmis 4 лет назад
Родитель
Сommit
20a1c564ee
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      packages/app/src/server/routes/apiv3/slack-integration.js

+ 3 - 2
packages/app/src/server/routes/apiv3/slack-integration.js

@@ -63,6 +63,7 @@ module.exports = (crowi) => {
       }
       if (Array.isArray(permission) && permission.includes(fromChannel)) {
         isPermitted = true;
+        return;
       }
     });
 
@@ -100,7 +101,7 @@ module.exports = (crowi) => {
     return res.status(403).send(`It is not allowed to run '${command}' command to this GROWI.`);
   }
 
-  async function checkInteractionspermission(req, res, next) {
+  async function checkInteractionsPermission(req, res, next) {
     const payload = JSON.parse(req.body.payload);
     if (payload == null) { // when /relation-test
       return next();
@@ -231,7 +232,7 @@ module.exports = (crowi) => {
     return handleInteractions(req, res, client);
   });
 
-  router.post('/proxied/interactions', verifyAccessTokenFromProxy, checkInteractionspermission, async(req, res) => {
+  router.post('/proxied/interactions', verifyAccessTokenFromProxy, checkInteractionsPermission, async(req, res) => {
     const tokenPtoG = req.headers['x-growi-ptog-tokens'];
     const client = await slackIntegrationService.generateClientByTokenPtoG(tokenPtoG);