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

Use res from db to set current bot type

Steven Fukase 5 лет назад
Родитель
Сommit
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() => {
   const handleChangeCurrentBotSettings = async() => {
     try {
     try {
-      await appContainer.apiv3.put('slack-integration/custom-bot-without-proxy', {
+      const res = await appContainer.apiv3.put('slack-integration/custom-bot-without-proxy', {
         slackSigningSecret: '',
         slackSigningSecret: '',
         slackBotToken: '',
         slackBotToken: '',
         botType: '',
         botType: '',
       });
       });
-      setCurrentBotType(selectedBotType);
+      setCurrentBotType(res.data.CustomBotWithProxySettingParams.slackBotType);
       setSelectedBotType(null);
       setSelectedBotType(null);
       toastSuccess(t('admin:slack_integration.bot_reset_successful'));
       toastSuccess(t('admin:slack_integration.bot_reset_successful'));
     }
     }