Преглед изворни кода

Use res from db to set current bot type

Steven Fukase пре 5 година
родитељ
комит
8d72fde76b
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx

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

@@ -33,12 +33,12 @@ const SlackIntegration = (props) => {
 
   const handleChangeCurrentBotSettings = async() => {
     try {
-      await appContainer.apiv3.put('slack-integration/custom-bot-without-proxy', {
+      const res = await appContainer.apiv3.put('slack-integration/custom-bot-without-proxy', {
         slackSigningSecret: '',
         slackBotToken: '',
         botType: '',
       });
-      setCurrentBotType(selectedBotType);
+      setCurrentBotType(res.data.CustomBotWithProxySettingParams.slackBotType);
       setSelectedBotType(null);
       toastSuccess(t('admin:slack_integration.bot_reset_successful'));
     }