Añadir los parametros de búsqueda en la api del producto
This commit is contained in:
parent
4207584997
commit
63783d1515
|
@ -147,11 +147,10 @@ export const useCartStore = defineStore("cart", () => {
|
||||||
routeId.value = id;
|
routeId.value = id;
|
||||||
try {
|
try {
|
||||||
const params = transformOptionsToParams(options);
|
const params = transformOptionsToParams(options);
|
||||||
|
|
||||||
const promises = [
|
const promises = [
|
||||||
apiBack.get(`products/${+id - 1}`),
|
apiBack.get(`products/${+id - 1}`, { params }),
|
||||||
apiBack.get(`products/${+id}`),
|
apiBack.get(`products/${+id}`, { params }),
|
||||||
apiBack.get(`products/${+id + 1}`),
|
apiBack.get(`products/${+id + 1}`, { params }),
|
||||||
];
|
];
|
||||||
const results = await Promise.allSettled(promises);
|
const results = await Promise.allSettled(promises);
|
||||||
const [prev, current, next] = results.map((res) => {
|
const [prev, current, next] = results.map((res) => {
|
||||||
|
|
Loading…
Reference in New Issue