Jelajahi Sumber

fix put to post add message

zahmis 5 tahun lalu
induk
melakukan
27493f3414
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      src/server/routes/apiv3/slack-integration.js

+ 3 - 2
src/server/routes/apiv3/slack-integration.js

@@ -270,10 +270,11 @@ module.exports = (crowi) => {
     }
   });
 
-  router.put('/test-notification-to-slack-work-space', async(req, res) => {
+  router.post('/test-notification-to-slack-work-space', async(req, res) => {
     const slackBotToken = crowi.configManager.getConfig('crowi', 'slackbot:token');
 
     if (slackBotToken === null) {
+      // i18n
       return 'Bot User OAuth Token is not setup.';
     }
 
@@ -284,8 +285,8 @@ module.exports = (crowi) => {
       this.client.chat.postMessage({
         channel: '#general',
         text: 'Your test was successful!',
-
       });
+      logger.info('SlackTest: send success massage to slack work space at #general');
       return res.apiv3({ slackBotToken });
     }
     catch (error) {