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