Explorar o código

renamed customBotWithoutProxySettingParams to slackBotTypeParam and removed unused keys

kaori %!s(int64=4) %!d(string=hai) anos
pai
achega
37425d1add

+ 1 - 1
src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx

@@ -90,7 +90,7 @@ const SlackIntegration = (props) => {
         slackBotToken: '',
         slackBotToken: '',
         currentBotType: selectedBotType,
         currentBotType: selectedBotType,
       });
       });
-      setCurrentBotType(res.data.customBotWithoutProxySettingParams.slackBotType);
+      setCurrentBotType(res.data.slackBotTypeParam.slackBotType);
       setSelectedBotType(null);
       setSelectedBotType(null);
       toastSuccess(t('admin:slack_integration.bot_reset_successful'));
       toastSuccess(t('admin:slack_integration.bot_reset_successful'));
       setIsRegisterSlackCredentials(false);
       setIsRegisterSlackCredentials(false);

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

@@ -187,19 +187,13 @@ module.exports = (crowi) => {
         requestParams['slackbot:token'] = slackBotToken;
         requestParams['slackbot:token'] = slackBotToken;
       }
       }
 
 
-      console.log('requestParams', requestParams);
-
       try {
       try {
         await updateSlackBotSettings(requestParams);
         await updateSlackBotSettings(requestParams);
         crowi.slackBotService.publishUpdatedMessage();
         crowi.slackBotService.publishUpdatedMessage();
 
 
         // TODO Impl to delete AccessToken both of Proxy and GROWI when botType changes.
         // TODO Impl to delete AccessToken both of Proxy and GROWI when botType changes.
-        const customBotWithoutProxySettingParams = {
-          slackSigningSecret: crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'),
-          slackBotToken: crowi.configManager.getConfig('crowi', 'slackbot:token'),
-          slackBotType: crowi.configManager.getConfig('crowi', 'slackbot:currentBotType'),
-        };
-        return res.apiv3({ customBotWithoutProxySettingParams });
+        const slackBotTypeParam = { slackBotType: crowi.configManager.getConfig('crowi', 'slackbot:currentBotType') };
+        return res.apiv3({ slackBotTypeParam });
       }
       }
       catch (error) {
       catch (error) {
         const msg = 'Error occured in updating Custom bot setting';
         const msg = 'Error occured in updating Custom bot setting';