zahmis 5 lat temu
rodzic
commit
a9aca05a1b
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/server/routes/apiv3/slack-integration.js

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

@@ -288,7 +288,7 @@ module.exports = (crowi) => {
   router.post('/notification-test-to-slack-work-space',
   router.post('/notification-test-to-slack-work-space',
     loginRequiredStrictly, adminRequired, csrf, validator.NotificationTestToSlackWorkSpace, apiV3FormValidator, async(req, res) => {
     loginRequiredStrictly, adminRequired, csrf, validator.NotificationTestToSlackWorkSpace, apiV3FormValidator, async(req, res) => {
       const isConnectedToSlack = crowi.slackBotService.isConnectedToSlack;
       const isConnectedToSlack = crowi.slackBotService.isConnectedToSlack;
-      const channel = req.body.channel;
+      const { channel } = req.body;
 
 
       if (isConnectedToSlack === false) {
       if (isConnectedToSlack === false) {
         const msg = 'Bot User OAuth Token is not setup.';
         const msg = 'Bot User OAuth Token is not setup.';
@@ -314,7 +314,7 @@ module.exports = (crowi) => {
       catch (error) {
       catch (error) {
         const msg = 'Error occured in testing to notify slack work space';
         const msg = 'Error occured in testing to notify slack work space';
         logger.error('Error', error);
         logger.error('Error', error);
-        return res.apiv3Err(new ErrorV3(msg, 'test-notify-slack-work-space-failed'), 500);
+        return res.apiv3Err(new ErrorV3(msg, 'notification-test-slack-work-space-failed'), 500);
       }
       }
     });
     });