Showing
1 changed file
with
4 additions
and
1 deletions
... | @@ -13,7 +13,7 @@ const sslport = 23023; | ... | @@ -13,7 +13,7 @@ const sslport = 23023; |
13 | const bodyParser = require('body-parser'); | 13 | 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 = ""; | 17 | var cmd = ""; |
18 | app.post('/hook', function (req, res) { | 18 | app.post('/hook', function (req, res) { |
19 | 19 | ||
... | @@ -31,6 +31,7 @@ app.post('/hook', function (req, res) { | ... | @@ -31,6 +31,7 @@ app.post('/hook', function (req, res) { |
31 | 31 | ||
32 | res.sendStatus(200); | 32 | res.sendStatus(200); |
33 | }); | 33 | }); |
34 | +*/ | ||
34 | 35 | ||
35 | app.post('/hook', function (req, res) { | 36 | app.post('/hook', function (req, res) { |
36 | 37 | ||
... | @@ -44,6 +45,8 @@ app.post('/hook', function (req, res) { | ... | @@ -44,6 +45,8 @@ app.post('/hook', function (req, res) { |
44 | console.log('[request source] ', eventObj.source); | 45 | console.log('[request source] ', eventObj.source); |
45 | console.log('[request message]', eventObj.message); | 46 | console.log('[request message]', eventObj.message); |
46 | 47 | ||
48 | + var cmd = eventObj.message.text; | ||
49 | + | ||
47 | if(cmd == "영어"){ | 50 | if(cmd == "영어"){ |
48 | transen(eventObj.replyToken, eventObj.message.text); | 51 | transen(eventObj.replyToken, eventObj.message.text); |
49 | } | 52 | } | ... | ... |
-
Please register or login to post a comment