김대욱

제발15

Showing 1 changed file with 31 additions and 0 deletions
...@@ -48,13 +48,44 @@ app.post('/hook', function (req, res) { ...@@ -48,13 +48,44 @@ app.post('/hook', function (req, res) {
48 var cmd = eventObj.message.text; 48 var cmd = eventObj.message.text;
49 49
50 if(cmd == "영어"){ 50 if(cmd == "영어"){
51 + app.post('/hook', function (req, res) {
52 +
53 + var eventObj = req.body.events[0];
54 + var source = eventObj.source;
55 + var message = eventObj.message;
56 +
51 transen(eventObj.replyToken, eventObj.message.text); 57 transen(eventObj.replyToken, eventObj.message.text);
58 +
59 +
60 + res.sendStatus(200);
61 + });
62 +
52 } 63 }
53 else if(cmd == "프랑스어"){ 64 else if(cmd == "프랑스어"){
65 + app.post('/hook', function (req, res) {
66 +
67 + var eventObj = req.body.events[0];
68 + var source = eventObj.source;
69 + var message = eventObj.message;
70 +
54 transfr(eventObj.replyToken, eventObj.message.text); 71 transfr(eventObj.replyToken, eventObj.message.text);
72 +
73 +
74 + res.sendStatus(200);
75 + });
55 } 76 }
56 else if(cmd == "일본어"){ 77 else if(cmd == "일본어"){
78 + app.post('/hook', function (req, res) {
79 +
80 + var eventObj = req.body.events[0];
81 + var source = eventObj.source;
82 + var message = eventObj.message;
83 +
57 transja(eventObj.replyToken, eventObj.message.text); 84 transja(eventObj.replyToken, eventObj.message.text);
85 +
86 +
87 + res.sendStatus(200);
88 + });
58 } 89 }
59 90
60 res.sendStatus(200); 91 res.sendStatus(200);
......