zahmis 5 лет назад
Родитель
Сommit
8761cfdf9a
1 измененных файлов с 2 добавлено и 5 удалено
  1. 2 5
      src/server/routes/apiv3/slack-integration.js

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

@@ -270,17 +270,14 @@ module.exports = (crowi) => {
     }
   });
 
-  function checkConnectedToSlack(res) {
+  router.post('/test-notification-to-slack-work-space', async(req, res) => {
+
     const isConnectedToSlack = crowi.slackBotService.isConnectedToSlack;
     if (!isConnectedToSlack) {
       const msg = 'Bot User OAuth Token is not setup.';
       logger.error('Error', msg);
       return res.apiv3Err(new ErrorV3(msg, 'not-setup-slack-bot-token', 400));
     }
-  }
-
-  router.post('/test-notification-to-slack-work-space', async(req, res) => {
-    checkConnectedToSlack(res);
 
     const slackBotToken = crowi.configManager.getConfig('crowi', 'slackbot:token');
     this.client = new WebClient(slackBotToken, { logLevel: LogLevel.DEBUG });