김대욱

shit2

Showing 1 changed file with 1 additions and 2 deletions
...@@ -14,11 +14,10 @@ const bodyParser = require('body-parser'); ...@@ -14,11 +14,10 @@ const bodyParser = require('body-parser');
14 var app = express(); 14 var app = express();
15 app.use(bodyParser.json()); 15 app.use(bodyParser.json());
16 16
17 -var cmd;
18 app.get('/hook', function (req, res) { 17 app.get('/hook', function (req, res) {
19 var eventObj = req.body.events[0]; 18 var eventObj = req.body.events[0];
20 var message = eventObj.message; 19 var message = eventObj.message;
21 - cmd = message.text; 20 + var cmd = message.text;
22 }); 21 });
23 22
24 app.post('/hook', function (req, res) { 23 app.post('/hook', function (req, res) {
......