Ver código fonte

request params in try

zahmis 5 anos atrás
pai
commit
61f8bdefb4
1 arquivos alterados com 6 adições e 8 exclusões
  1. 6 8
      src/server/routes/apiv3/slack-integration.js

+ 6 - 8
src/server/routes/apiv3/slack-integration.js

@@ -185,15 +185,13 @@ module.exports = (crowi) => {
   router.put('/custom-bot-without-proxy',
   router.put('/custom-bot-without-proxy',
     accessTokenParser, loginRequiredStrictly, adminRequired, csrf, validator.CustomBotWithoutProxy, apiV3FormValidator, async(req, res) => {
     accessTokenParser, loginRequiredStrictly, adminRequired, csrf, validator.CustomBotWithoutProxy, apiV3FormValidator, async(req, res) => {
       const { slackSigningSecret, slackBotToken, currentBotType } = req.body;
       const { slackSigningSecret, slackBotToken, currentBotType } = req.body;
-
-      console.log(req.params);
-      const requestParams = {
-        'slackbot:signingSecret': slackSigningSecret,
-        'slackbot:token': slackBotToken,
-        'slackbot:currentBotType': currentBotType,
-      };
-
       try {
       try {
+        console.log(req.body);
+        const requestParams = {
+          'slackbot:signingSecret': slackSigningSecret,
+          'slackbot:token': slackBotToken,
+          'slackbot:currentBotType': currentBotType,
+        };
         await updateSlackBotSettings(requestParams);
         await updateSlackBotSettings(requestParams);
 
 
         // initialize slack service
         // initialize slack service