Skip to content

Commit

Permalink
Update logging incoming body
Browse files Browse the repository at this point in the history
  • Loading branch information
schwasa authored Feb 4, 2024
1 parent f718507 commit 6ce1e96
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6ce1e96

Please sign in to comment.