From a9f0a790ed897a8fe9c9275163a1b18c15614cf1 Mon Sep 17 00:00:00 2001 From: Gustavo Veiga <71990656+gustavovianaveiga@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:27:00 -0300 Subject: [PATCH] Update README.md --- README.md | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 17d4cdb..d86eb44 100644 --- a/README.md +++ b/README.md @@ -2560,23 +2560,10 @@ app.post('/', async (req, res) => { content: req.body.toString(), signature: req.headers['digital-signature'] }); - if (event.subscription === 'transfer') { - console.log(event.log.transfer); - } else if (event.subscription === 'boleto') { - console.log(event.log.boleto); - } else if (event.subscription === 'boleto-payment') { - console.log(event.log.payment); - } else if (event.subscription === 'utility-payment') { - console.log(event.log.payment); - } else if (event.subscription === 'boleto-holmes') { - console.log(event.log.holmes); - } else if (event.subscription === 'brcode-payment') { - console.log(event.log.payment); - } else if (event.subscription === 'deposit') { - console.log(event.log.deposit); - } else if (event.subscription === 'invoice') { - console.log(event.log.invoice); - } + const subscription = event.log[event.subscription] + + console.log(subscription) + res.end() } catch (err) {