kaori 4 лет назад
Родитель
Сommit
2332227905

+ 3 - 3
src/client/js/components/Admin/SlackIntegration/CustomBotWithoutProxySettings.jsx

@@ -19,9 +19,9 @@ const CustomBotWithoutProxySettings = (props) => {
   const deleteSlackSettingsHandler = async() => {
     try {
       await appContainer.apiv3.put('/slack-integration-settings/bot-type', {
-        slackSigningSecret: '',
-        slackBotToken: '',
-        currentBotType: '',
+        slackSigningSecret: null,
+        slackBotToken: null,
+        currentBotType: null,
       });
       toastSuccess('success');
     }

+ 4 - 4
src/server/routes/apiv3/slack-integration-settings.js

@@ -62,9 +62,9 @@ module.exports = (crowi) => {
 
   async function resetAllBotSettings() {
     const params = {
-      'slackbot:currentBotType': '',
-      'slackbot:signingSecret': '',
-      'slackbot:token': '',
+      'slackbot:currentBotType': null,
+      'slackbot:signingSecret': null,
+      'slackbot:token': null,
     };
     const { configManager } = crowi;
     // update config without publishing S2sMessage
@@ -170,7 +170,7 @@ module.exports = (crowi) => {
     accessTokenParser, loginRequiredStrictly, adminRequired, csrf, apiV3FormValidator, async(req, res) => {
 
       await resetAllBotSettings();
-      const params = { 'slackbot:currentBotType': '' };
+      const params = { 'slackbot:currentBotType': null };
 
       try {
         await updateSlackBotSettings(params);