Browse Source

Use res from db to set current bot type

Steven Fukase 5 years ago
parent
commit
8d72fde76b

+ 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'));
     }