김대욱

new3

Showing 1 changed file with 3 additions and 18 deletions
......@@ -25,32 +25,17 @@ app.post('/hook', function (req, res) {
console.log('[request]', req.body);
console.log('[request source] ', eventObj.source);
console.log('[request message]', eventObj.message);
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.on('line', function(line) {
console.log(line);
if(line =="영어"){
if(request.get == "영어"){
transen(eventObj.replyToken, eventObj.message.text);
}
else if(line =="프랑스어"){
else if(request.get == "프랑스어"){
transfr(eventObj.replyToken, eventObj.message.text);
}
else if(line =="일본어"){
else if(request.get == "일본어"){
transja(eventObj.replyToken, eventObj.message.text);
}
rl.close();
}).on("close", function() {
process.exit();
});
res.sendStatus(200);
});
......