浏览代码

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