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

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

@@ -63,11 +63,26 @@ module.exports = (crowi) => {
    *          200:
    *            description: Succeeded to get SigningSecret and SlackBotToken.
    */
-  router.get('/custom-bot-setting', accessTokenParser, loginRequiredStrictly, adminRequired, async(req, res) => {
+  router.get('/', accessTokenParser, loginRequiredStrictly, adminRequired, async(req, res) => {
 
     const slackBotSettingParams = {
-      slackSigningSecret: await crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'),
-      slackBotToken: await crowi.configManager.getConfig('crowi', 'slackbot:token'),
+
+      generalSlackBot: {
+        isCustomNonProxyEnabled: await crowi.configManager.getConfig('crowi', ''),
+        // isCustomWithProxyEnabled: ,
+        // isOfficialEnabled: ,
+      },
+      // TODO impl when creating official bot
+      // officialBotSettings: {
+      // },
+      cusotmBotSettingsNonProxy: {
+        slackSigningSecret: await crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'),
+        slackBotToken: await crowi.configManager.getConfig('crowi', 'slackbot:token'),
+      },
+      // TODO imple when creating with proxy
+      // cusotmBotSettingsWithProxy: {
+      // },
+
     };
     return res.apiv3({ slackBotSettingParams });
   });