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

fix cannot update new credentials

zahmis 5 лет назад
Родитель
Сommit
2a65208676

+ 6 - 0
src/client/js/components/Admin/SlackIntegration/CustomBotWithoutProxySettingsAccordion.jsx

@@ -38,7 +38,13 @@ const CustomBotWithoutProxySettingsAccordion = ({
         slackBotToken,
         currentBotType,
       });
+
       setIsRegisterSlackCredentials(true);
+      if (slackSigningSecret === '' || slackBotToken === '') {
+        setIsRegisterSlackCredentials(false);
+        setIsSendTestMessage(false);
+      }
+
       toastSuccess(t('toaster.update_successed', { target: t('admin:slack_integration.custom_bot_without_proxy_settings') }));
     }
     catch (err) {

+ 1 - 0
src/server/routes/apiv3/slack-integration.js

@@ -186,6 +186,7 @@ module.exports = (crowi) => {
     accessTokenParser, loginRequiredStrictly, adminRequired, csrf, validator.CustomBotWithoutProxy, apiV3FormValidator, async(req, res) => {
       const { slackSigningSecret, slackBotToken, currentBotType } = req.body;
 
+      console.log(req.params);
       const requestParams = {
         'slackbot:signingSecret': slackSigningSecret,
         'slackbot:token': slackBotToken,