diff --git a/product.ts b/product.ts index 7aa7286..56d7c34 100644 --- a/product.ts +++ b/product.ts @@ -11,6 +11,7 @@ export interface ProductosQuery { * Decide si solo traer los productos habilitados. */ onlyEnabled?: boolean; + filter?: string; } export interface Producto { @@ -61,6 +62,9 @@ export async function getProductos( if ("onlyEnabled" in options) { searchParams.set("onlyEnabled", options.onlyEnabled ? "true" : "false"); } + if (options.filter) { + searchParams.set("filter", options.filter); + } const res = await fetch( `${HOST}/api/Aperture/Product?${searchParams.toString()}`, {