최원섭

[Develop] Bot Message API

Showing 1 changed file with 20 additions and 0 deletions
......@@ -16,5 +16,25 @@ app.get('/keyboard', function(req, res) {
}).send(JSON.stringify(menu));
});
app.post('/message', function(req, res) {
const _obj = {
user_key: req.body.user_key,
type: req.body.type,
content: req.body.content
};
console.log(_obj.content)
let massage = {
"message": {
"text": _obj.content
},
};
res.set({
'content-type': 'application/json'
}).send(JSON.stringify(massage));
});
app.listen(80, function(){
});
......