kaori 5 лет назад
Родитель
Сommit
32e08ff860
2 измененных файлов с 20 добавлено и 20 удалено
  1. 1 1
      src/server/routes/apiv3/slack-bot.js
  2. 19 19
      src/server/service/bolt-reciever.js

+ 1 - 1
src/server/routes/apiv3/slack-bot.js

@@ -9,8 +9,8 @@ module.exports = (crowi) => {
 
   router.get('/:endpoints', async(req, res) => {
 
+
     const expressApp = express;
-    // this.server = createServer(this.app);
     const { endpoints } = req.params;
 
     for (const endpoint of endpoints) {

+ 19 - 19
src/server/service/bolt-reciever.js

@@ -8,31 +8,31 @@ const { EventEmitter } = require('events');
  */
 class BoltRecieverService extends EventEmitter {
 
-  constructor(signingSecret, endpoints) {
-    super();
-    // this.app = express();
-    // this.server = createServer(this.app);
+  // constructor(signingSecret, endpoints) {
+  //   super();
+  // this.app = express();
+  // this.server = createServer(this.app);
 
-    // for (const endpoint of endpoints) {
-    //   this.app.post(endpoint, this.requestHandler.bind(this));
-    // }
-  }
+  // for (const endpoint of endpoints) {
+  //   this.app.post(endpoint, this.requestHandler.bind(this));
+  // }
+  // }
 
   init(app) {
     this.bolt = app;
   }
 
-  stop() {
-    return new Promise((resolve, reject) => {
-      this.server.close((error) => {
-        if (error) {
-          reject(error);
-          return;
-        }
-        resolve();
-      });
-    });
-  }
+  // stop() {
+  //   return new Promise((resolve, reject) => {
+  //     this.server.close((error) => {
+  //       if (error) {
+  //         reject(error);
+  //         return;
+  //       }
+  //       resolve();
+  //     });
+  //   });
+  // }
 
   // This is a very simple implementation. Look at the ExpressReceiver source for more detail
   async requestHandler(req, res) {