From 6ce1e965ad0640f3c265220acaf871e92b8d58fe Mon Sep 17 00:00:00 2001 From: schwasa <102740850+schwasa@users.noreply.github.com> Date: Sun, 4 Feb 2024 20:19:48 +0100 Subject: [PATCH] Update logging incoming body --- app.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app.js b/app.js index 0fb8c17..9229b33 100644 --- a/app.js +++ b/app.js @@ -51,6 +51,7 @@ app.get('/', (req, res) => { app.post('/webhook', async (req, res) => { // Parse the request body from the POST let body = req.body + console.log('Incoming message', body); // Check the Incoming webhook message // info on WhatsApp text message payload: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples#text-messages @@ -682,8 +683,7 @@ app.post('/template/scheduler', async (req, res) => { }, data: data }; - // Logging the Axios configuration - console.log('Axios config:', config); + const response = await axios(config); // Logging the response from the WhatsApp API @@ -746,8 +746,6 @@ app.post('/template/appointscheduler', async (req, res) => { }, data: data }; - // Logging the Axios configuration - console.log('Axios config:', config); const response = await axios(config); // Logging the response from the WhatsApp API @@ -839,8 +837,6 @@ app.post('/template/module', async (req, res) => { }, data: data }; - // Logging the Axios configuration - console.log('Axios config:', config); const response = await axios(config); // Logging the response from the WhatsApp API