Skip to content

Commit

Permalink
fix: parsing returned tag id to string to save tracking code
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Sep 17, 2024
1 parent 2b39ffc commit 30f41bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/routes/ecom/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exports.post = ({ appSdk }, req, res) => {
const data = await createTag(order, storeId, appData, appSdk)
logger.info(`Tag created for #${storeId} ${orderId}`, { data })
trackingCodes.push({
code: data['@id'] || data.id,
code: String(data['@id'] || data.id),
link: 'https://www.freteclick.com.br/rastreamento',
tag: 'freteclick'
})
Expand Down Expand Up @@ -78,7 +78,7 @@ exports.post = ({ appSdk }, req, res) => {
res.status(412).send(msg)
} else {
if (err.response) {
logger.warn(`Failed fetching ${err.config?.url}`, {
logger.warn(`Failed ${err.config?.method} ${err.config?.url}`, {
request: err.config,
response: err.response.data,
status: err.response.status
Expand Down

0 comments on commit 30f41bf

Please sign in to comment.