zahmis hace 5 años
padre
commit
a2614fab44
Se han modificado 1 ficheros con 11 adiciones y 3 borrados
  1. 11 3
      src/server/routes/apiv3/slack-bot-setting.js

+ 11 - 3
src/server/routes/apiv3/slack-bot-setting.js

@@ -68,9 +68,9 @@ module.exports = (crowi) => {
     const slackBotSettingParams = {
 
       generalSlackBot: {
-        isOfficialEnabled: await crowi.configManager.getConfig('crowi', 'slackbot:isOfficialEnabled'),
-        isCustomNonProxyEnabled: await crowi.configManager.getConfig('crowi', 'slackbot:isCustomNonProxyEnabled'),
-        isCustomWithProxyEnabled: await crowi.configManager.getConfig('crowi', 'slackbot:isCustomWithProxyEnabled'),
+        isOfficialEnabled: await crowi.configManager.getConfig('crowi', 'slackbot:isOfficial:Enabled'),
+        isCustomNonProxyEnabled: await crowi.configManager.getConfig('crowi', 'slackbot:isCustomNonProxy:Enabled'),
+        isCustomWithProxyEnabled: await crowi.configManager.getConfig('crowi', 'slackbot:isCustomWithProxy:Enabled'),
       },
       // TODO impl when creating official bot
       officialBotSettings: {
@@ -129,5 +129,13 @@ module.exports = (crowi) => {
       }
     });
 
+  router.put('/enabled', async(req, res) => {
+    const { isEnabled, botType } = req.body;
+    const enableParams = { [`slackbot:${botType}:isEnabled`]: isEnabled };
+
+
+  });
+
+
   return router;
 };