zahmis 5 years ago
parent
commit
bbb6fe0b39
1 changed files with 4 additions and 7 deletions
  1. 4 7
      src/server/routes/apiv3/slack-bot-setting.js

+ 4 - 7
src/server/routes/apiv3/slack-bot-setting.js

@@ -46,7 +46,7 @@ module.exports = (crowi) => {
     ],
     ],
   };
   };
 
 
-  async function updateBotSettings(params) {
+  async function updateSlackBotSettings(params) {
     const { configManager } = crowi;
     const { configManager } = crowi;
     // update config without publishing S2sMessage
     // update config without publishing S2sMessage
     return configManager.updateConfigsInTheSameNamespace('crowi', params, true);
     return configManager.updateConfigsInTheSameNamespace('crowi', params, true);
@@ -68,20 +68,17 @@ module.exports = (crowi) => {
   router.get('/', accessTokenParser, loginRequiredStrictly, adminRequired, async(req, res) => {
   router.get('/', accessTokenParser, loginRequiredStrictly, adminRequired, async(req, res) => {
 
 
     const slackBotSettingParams = {
     const slackBotSettingParams = {
-
       slackBotType: await crowi.configManager.getConfig('crowi', 'slackbot:type'),
       slackBotType: await crowi.configManager.getConfig('crowi', 'slackbot:type'),
-
       // TODO impl when creating official bot
       // TODO impl when creating official bot
       officialBotSettings: {
       officialBotSettings: {
       },
       },
-      cusotmBotSettingsNonProxy: {
+      cusotmBotNonProxySettings: {
         slackSigningSecret: await crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'),
         slackSigningSecret: await crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'),
         slackBotToken: await crowi.configManager.getConfig('crowi', 'slackbot:token'),
         slackBotToken: await crowi.configManager.getConfig('crowi', 'slackbot:token'),
       },
       },
       // TODO imple when creating with proxy
       // TODO imple when creating with proxy
-      cusotmBotSettingsWithProxy: {
+      cusotmBotWithProxySettings: {
       },
       },
-
     };
     };
     return res.apiv3({ slackBotSettingParams });
     return res.apiv3({ slackBotSettingParams });
   });
   });
@@ -116,7 +113,7 @@ module.exports = (crowi) => {
       };
       };
 
 
       try {
       try {
-        await updateBotSettings(requestParams);
+        await updateSlackBotSettings(requestParams);
         const slackBotSettingParams = {
         const slackBotSettingParams = {
           slackSigningSecret: await crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'),
           slackSigningSecret: await crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'),
           slackBotToken: await crowi.configManager.getConfig('crowi', 'slackbot:token'),
           slackBotToken: await crowi.configManager.getConfig('crowi', 'slackbot:token'),