Steven Fukase 5 лет назад
Родитель
Сommit
1aac23a195

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

@@ -45,9 +45,9 @@ module.exports = (crowi) => {
       body('botType').isString(),
     ],
     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: {
     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,
     default: null,
   },