From bbae4e94c56717416c1ee11a3d1b06f5d741d497 Mon Sep 17 00:00:00 2001 From: matheusgnreis Date: Fri, 27 Oct 2023 17:26:45 -0300 Subject: [PATCH] chore: return res --- functions/routes/ecom/modules/calculate-shipping.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/routes/ecom/modules/calculate-shipping.js b/functions/routes/ecom/modules/calculate-shipping.js index 4ae9035..ef27f72 100644 --- a/functions/routes/ecom/modules/calculate-shipping.js +++ b/functions/routes/ecom/modules/calculate-shipping.js @@ -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 @@ -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')