From 3429b10896abcbd02703fb98c47b026c17e11465 Mon Sep 17 00:00:00 2001 From: Nulo Date: Mon, 1 Nov 2021 17:49:14 -0300 Subject: [PATCH] Price: filtrar por filtro y SKU --- price.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/price.ts b/price.ts index 4f85c8d..e5ec9eb 100644 --- a/price.ts +++ b/price.ts @@ -7,6 +7,8 @@ import { export interface PriceQuery { paginacion?: Paginacion; + filter?: string; + SKUCode?: string; } export interface Price { @@ -28,6 +30,12 @@ export async function getPrices( ): Promise { let searchParams = new URLSearchParams(); paginacionToSearchParams(options.paginacion, searchParams); + if (options.filter) { + searchParams.set("filter", options.filter); + } + if (options.SKUCode) { + searchParams.set("SKUCode", options.SKUCode); + } const res = await fetch( `${HOST}/api/Aperture/Price?${searchParams.toString()}`, {