김대욱

wish

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