Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -32,6 +32,7 @@ const client = new line.Client(config); | ... | @@ -32,6 +32,7 @@ const client = new line.Client(config); |
32 | // register a webhook handler with middleware | 32 | // register a webhook handler with middleware |
33 | // about the middleware, please refer to doc | 33 | // about the middleware, please refer to doc |
34 | app.post('/webhook', line.middleware(config), (req, res) => { | 34 | app.post('/webhook', line.middleware(config), (req, res) => { |
35 | + console.log("webhook"); | ||
35 | Promise | 36 | Promise |
36 | .all(req.body.events.map(handleEvent)) | 37 | .all(req.body.events.map(handleEvent)) |
37 | .then((result) => res.json(result)) | 38 | .then((result) => res.json(result)) |
... | @@ -43,6 +44,7 @@ app.post('/webhook', line.middleware(config), (req, res) => { | ... | @@ -43,6 +44,7 @@ app.post('/webhook', line.middleware(config), (req, res) => { |
43 | 44 | ||
44 | // event handler | 45 | // event handler |
45 | function handleEvent(event) { | 46 | function handleEvent(event) { |
47 | + console.log("handleevent"); | ||
46 | if (event.type !== 'message' || event.message.type !== 'text') { | 48 | if (event.type !== 'message' || event.message.type !== 'text') { |
47 | // ignore non-text-message event | 49 | // ignore non-text-message event |
48 | return Promise.resolve(null); | 50 | return Promise.resolve(null); | ... | ... |
-
Please register or login to post a comment