From 63783d15157ddeb69ce6dfceb1897ba3f16f9333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaume=20Sol=C3=ADs?= Date: Thu, 11 Apr 2024 11:49:30 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adir=20los=20parametros=20de=20b=C3=BAsq?= =?UTF-8?q?ueda=20en=20la=20api=20del=20producto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/cart.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/stores/cart.js b/src/stores/cart.js index e7e6a0f..a36bfb7 100644 --- a/src/stores/cart.js +++ b/src/stores/cart.js @@ -147,11 +147,10 @@ export const useCartStore = defineStore("cart", () => { routeId.value = id; try { const params = transformOptionsToParams(options); - const promises = [ - apiBack.get(`products/${+id - 1}`), - apiBack.get(`products/${+id}`), - apiBack.get(`products/${+id + 1}`), + apiBack.get(`products/${+id - 1}`, { params }), + apiBack.get(`products/${+id}`, { params }), + apiBack.get(`products/${+id + 1}`, { params }), ]; const results = await Promise.allSettled(promises); const [prev, current, next] = results.map((res) => {