Просмотр исходного кода

get proxyServerUri from slackIntegrationService.proxyUriForCurrentType (#4416)

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

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

@@ -164,7 +164,7 @@ module.exports = (crowi) => {
    */
    */
   router.get('/', accessTokenParser, loginRequiredStrictly, adminRequired, async(req, res) => {
   router.get('/', accessTokenParser, loginRequiredStrictly, adminRequired, async(req, res) => {
 
 
-    const { configManager } = crowi;
+    const { configManager, slackIntegrationService } = crowi;
     const currentBotType = configManager.getConfig('crowi', 'slackbot:currentBotType');
     const currentBotType = configManager.getConfig('crowi', 'slackbot:currentBotType');
 
 
     // retrieve settings
     // retrieve settings
@@ -177,8 +177,7 @@ module.exports = (crowi) => {
       settings.commandPermission = JSON.parse(configManager.getConfig('crowi', 'slackbot:withoutProxy:commandPermission'));
       settings.commandPermission = JSON.parse(configManager.getConfig('crowi', 'slackbot:withoutProxy:commandPermission'));
     }
     }
     else {
     else {
-      settings.proxyServerUri = crowi.configManager.getConfig('crowi', 'slackbot:proxyUri');
-      settings.proxyUriEnvVars = configManager.getConfigFromEnvVars('crowi', 'slackbot:proxyUri');
+      settings.proxyServerUri = slackIntegrationService.proxyUriForCurrentType;
     }
     }
 
 
     // retrieve connection statuses
     // retrieve connection statuses