Skip to content

Commit

Permalink
chore: add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgnreis authored Jul 25, 2024
1 parent d67f6de commit fec20a5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions functions/routes/ecom/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ exports.post = ({ appSdk }, req, res) => {
mandaBemKey = appData.mandabem_token
warehouses = appData.warehouses || []
const sendStatus = parseStatus(appData.send_tag_status)
console.log('>> Webhook <<', sendStatus, mandaBemId && mandaBemKey && !appData.disable_auto_tag, order &&
(order.fulfillment_status?.current === sendStatus ||
order.financial_status?.current === sendStatus))
console.log('>> Webhook <<', sendStatus, mandaBemId && mandaBemKey && !appData.disable_auto_tag)
if (mandaBemId && mandaBemKey && !appData.disable_auto_tag) {
const order = trigger.body
console.log('>> Webhook', sendStatus, mandaBemId && mandaBemKey && !appData.disable_auto_tag, order &&
(order.fulfillment_status?.current === sendStatus ||
order.financial_status?.current === sendStatus))
if (
order &&
(order.fulfillment_status?.current === sendStatus ||
Expand Down

0 comments on commit fec20a5

Please sign in to comment.