김대욱

제발14

Showing 1 changed file with 4 additions and 1 deletions
......@@ -13,7 +13,7 @@ const sslport = 23023;
const bodyParser = require('body-parser');
var app = express();
app.use(bodyParser.json());
/*
var cmd = "";
app.post('/hook', function (req, res) {
......@@ -31,6 +31,7 @@ app.post('/hook', function (req, res) {
res.sendStatus(200);
});
*/
app.post('/hook', function (req, res) {
......@@ -44,6 +45,8 @@ app.post('/hook', function (req, res) {
console.log('[request source] ', eventObj.source);
console.log('[request message]', eventObj.message);
var cmd = eventObj.message.text;
if(cmd == "영어"){
transen(eventObj.replyToken, eventObj.message.text);
}
......