Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.

Commit 81ac180

Browse files
committed
Update app.js
1 parent 27b72c0 commit 81ac180

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ const auth = new google.auth.GoogleAuth({
2323
// ฟังชั่นหลัก
2424
app.post('/webhook', line.middleware(lineConfig), async (req, res, next) => {
2525
try {
26-
const events = req.body.events
27-
console.log('event', events)
26+
const events = req.body.events;
27+
//console.log('event', events);
28+
console.log(`User Input: ${events.message.text}`);
2829
events.length > 0 ? await events.map(item => handleEvent(item)) : res.status(200).send("OK");
2930

3031
if (req.session.user) return next();
3132
return next(new NotAuthorizedError());
3233
} catch (e) {
33-
res.status(500).end()
34+
res.status(500).end();
3435
}
3536
});
3637

0 commit comments

Comments
 (0)