Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
feat(webhook): log payload
Browse files Browse the repository at this point in the history
  • Loading branch information
julie-ng committed Sep 22, 2019
1 parent 77718f3 commit c748b77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ app.get('/health', (req, res) => {
})

app.post('/webhooks/test', bodyParser.json(), (req, res) => {
res.send(JSON.stringify({
let payload = {
status: 'OK',
payload: {
headers: req.headers,
body: req.body
}
}))
}
console.log(payload)
res.send(JSON.stringify(payload))
})

app.use((req, res, next) => {
Expand Down

0 comments on commit c748b77

Please sign in to comment.