Showing
1 changed file
with
5 additions
and
4 deletions
... | @@ -25,15 +25,16 @@ app.post('/hook', function (req, res) { | ... | @@ -25,15 +25,16 @@ app.post('/hook', function (req, res) { |
25 | console.log('[request source] ', eventObj.source); | 25 | console.log('[request source] ', eventObj.source); |
26 | console.log('[request message]', eventObj.message); | 26 | console.log('[request message]', eventObj.message); |
27 | 27 | ||
28 | - const question = req.body.userRequest.utterance; | 28 | + var cmd = message.text; |
29 | + console.log('[command]',cmd); | ||
29 | 30 | ||
30 | - if(question == "영어"){ | 31 | + if(cmd == "영어"){ |
31 | transen(eventObj.replyToken, eventObj.message.text); | 32 | transen(eventObj.replyToken, eventObj.message.text); |
32 | } | 33 | } |
33 | - else if(question == "프랑스어"){ | 34 | + else if(cmd == "프랑스어"){ |
34 | transfr(eventObj.replyToken, eventObj.message.text); | 35 | transfr(eventObj.replyToken, eventObj.message.text); |
35 | } | 36 | } |
36 | - else if(question == "일본어"){ | 37 | + else if(cmd == "일본어"){ |
37 | transja(eventObj.replyToken, eventObj.message.text); | 38 | transja(eventObj.replyToken, eventObj.message.text); |
38 | } | 39 | } |
39 | 40 | ... | ... |
-
Please register or login to post a comment