김대욱

wish2

Showing 1 changed file with 6 additions and 5 deletions
......@@ -24,16 +24,17 @@ app.post('/hook', function (req, res) {
console.log('[request]', req.body);
console.log('[request source] ', eventObj.source);
console.log('[request message]', eventObj.message);
var cmd = message.text;
console.log('[command]',cmd);
const question = req.body.userRequest.utterance;
if(question == "영어"){
if(cmd == "영어"){
transen(eventObj.replyToken, eventObj.message.text);
}
else if(question == "프랑스어"){
else if(cmd == "프랑스어"){
transfr(eventObj.replyToken, eventObj.message.text);
}
else if(question == "일본어"){
else if(cmd == "일본어"){
transja(eventObj.replyToken, eventObj.message.text);
}
......