Steven Fukase 5 лет назад
Родитель
Сommit
1aac23a195
2 измененных файлов с 4 добавлено и 4 удалено
  1. 3 3
      src/server/routes/apiv3/slack-integration.js
  2. 1 1
      src/server/service/config-loader.js

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

@@ -45,9 +45,9 @@ module.exports = (crowi) => {
       body('botType').isString(),
       body('botType').isString(),
     ],
     ],
     SlackIntegration: [
     SlackIntegration: [
-      body('currentBotType') === 'official-bot'
-      || body('currentBotType') === 'custom-bot-without-proxy'
-      || body('currentBotType') === 'custom-bot-with-proxy',
+      body('currentBotType')
+        .isString()
+        .isIn(['official-bot', 'custom-bot-without-proxy', 'custom-bot-with-proxy']),
     ],
     ],
   };
   };
 
 

+ 1 - 1
src/server/service/config-loader.js

@@ -412,7 +412,7 @@ const ENV_VAR_NAME_TO_CONFIG_INFO = {
   },
   },
   SLACK_BOT_TYPE: {
   SLACK_BOT_TYPE: {
     ns:      'crowi',
     ns:      'crowi',
-    key:     'slackbot:type', // eg. official || custom-without-proxy || custom-with-proxy
+    key:     'slackbot:currentBotType', // 'official-bot' || 'custom-bot-without-proxy' || 'custom-bot-with-proxy'
     type:    TYPES.STRING,
     type:    TYPES.STRING,
     default: null,
     default: null,
   },
   },