김대욱

제발12

Showing 1 changed file with 0 additions and 16 deletions
......@@ -14,7 +14,6 @@ const bodyParser = require('body-parser');
var app = express();
app.use(bodyParser.json());
var cmd = "";
app.post('/hook', function (req, res) {
var eventObj = req.body.events[0];
......@@ -29,21 +28,6 @@ app.post('/hook', function (req, res) {
cmd = eventObj.message.text;
res.sendStatus(200);
});
app.post('/hook', function (req, res) {
var eventObj = req.body.events[0];
var source = eventObj.source;
var message = eventObj.message;
// request log
console.log('======================', new Date() ,'======================');
console.log('[request]', req.body);
console.log('[request source] ', eventObj.source);
console.log('[request message]', eventObj.message);
if(cmd == "영어"){
trans(eventObj.replyToken, eventObj.message.text);
}
......