Añadir los parametros de búsqueda en la api del producto

This commit is contained in:
Jaume Solís 2024-04-11 11:49:30 +02:00
parent 4207584997
commit 63783d1515
1 changed files with 3 additions and 4 deletions

View File

@ -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) => {