Filtrar Product

This commit is contained in:
Cat /dev/Nulo 2021-11-01 17:46:53 -03:00
parent 0e815bd07b
commit 1a66628ec8

View file

@ -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()}`,
{