zahmis 5 лет назад
Родитель
Сommit
1270abeccb
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      src/server/routes/apiv3/slack-integration-settings.js

+ 8 - 0
src/server/routes/apiv3/slack-integration-settings.js

@@ -478,5 +478,13 @@ module.exports = (crowi) => {
     }
   });
 
+  router.post('/without-proxy/relation-test', loginRequiredStrictly, adminRequired, csrf, async(req, res) => {
+    const currentBotType = crowi.configManager.getConfig('crowi', 'slackbot:currentBotType');
+    if (currentBotType !== 'customBotWithoutProxy') {
+      const msg = 'Select Without Proxy Type';
+      return res.apiv3Err(new ErrorV3(msg, 'select-not-proxy-type'), 400);
+    }
+  });
+
   return router;
 };