Skip to content

Commit

Permalink
chore: return res
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgnreis committed Oct 27, 2023
1 parent b937b59 commit bbae4e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions/routes/ecom/modules/calculate-shipping.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ exports.post = ({ appSdk }, req, res) => {

const enivixAxios = new EnivixAxios(api_key, token, email, storeId)

if (!params.to) {
/* if (!params.to) {
// just a free shipping preview with no shipping address received
// respond only with free shipping option
res.send(response)
return
}
} */

if (!tokenProd) {
// must have configured kangu doc number and token
Expand Down Expand Up @@ -229,7 +229,7 @@ exports.post = ({ appSdk }, req, res) => {
}
}

res.send(response)
return res.send(response)
} else {
// console.log(data)
const err = new Error('Invalid frete barato calculate response')
Expand Down

0 comments on commit bbae4e9

Please sign in to comment.