Filtrar Product
This commit is contained in:
parent
0e815bd07b
commit
1a66628ec8
1 changed files with 4 additions and 0 deletions
|
@ -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()}`,
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue