Browse Source

add getSlackLegacy in index.js

zahmis 5 years ago
parent
commit
9e7660012b
2 changed files with 6 additions and 1 deletions
  1. 4 0
      src/server/crowi/index.js
  2. 2 1
      src/server/routes/apiv3/notification-setting.js

+ 4 - 0
src/server/crowi/index.js

@@ -314,6 +314,10 @@ Crowi.prototype.getSlack = function() {
   return this.slack;
 };
 
+Crowi.prototype.getSlackLegacy = function() {
+  return this.slackLegacy;
+};
+
 Crowi.prototype.getInterceptorManager = function() {
   return this.interceptorManager;
 };

+ 2 - 1
src/server/routes/apiv3/notification-setting.js

@@ -181,7 +181,8 @@ module.exports = (crowi) => {
         isIncomingWebhookPrioritized: await crowi.configManager.getConfig('notification', 'slack:isIncomingWebhookPrioritized'),
         slackToken: await crowi.configManager.getConfig('notification', 'slack:token'),
       };
-      await crowi.setupSlack();
+      // await crowi.setupSlack();
+      await crowi.setupSlackLegacy();
       return res.apiv3({ responseParams });
     }
     catch (err) {