From 517466c313c438b9f01e48aa09f3978225c1e12c Mon Sep 17 00:00:00 2001 From: Oliver Heywood Date: Mon, 11 Oct 2021 10:13:46 -0500 Subject: [PATCH] clean things up like console.log --- .../catalog/products/get-products.ts | 2 -- framework/ordercloud/product/use-search.tsx | 20 ++++--------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/framework/ordercloud/api/endpoints/catalog/products/get-products.ts b/framework/ordercloud/api/endpoints/catalog/products/get-products.ts index 45ed9a919..3e8f2faad 100644 --- a/framework/ordercloud/api/endpoints/catalog/products/get-products.ts +++ b/framework/ordercloud/api/endpoints/catalog/products/get-products.ts @@ -17,8 +17,6 @@ const getProducts: ProductsEndpoint['handlers']['getProducts'] = async ({ body: { search, categoryId, brandId, sort }, config: { restBuyerFetch, cartCookie, tokenCookie }, }) => { - console.log("categoryId", categoryId) - //Use a dummy base as we only care about the relative path const url = new URL('/me/products', 'http://a') diff --git a/framework/ordercloud/product/use-search.tsx b/framework/ordercloud/product/use-search.tsx index bb67085c1..a8bed6581 100644 --- a/framework/ordercloud/product/use-search.tsx +++ b/framework/ordercloud/product/use-search.tsx @@ -10,24 +10,12 @@ export const handler: SWRHook = { }, fetcher({ input: { search, categoryId, brandId, sort }, options, fetch }) { // Use a dummy base as we only care about the relative path - console.log("url:", options.url); - const url = new URL(options.url!, 'http://a') - if (search) { - url.searchParams.set('search', search) - } - if (categoryId) { - url.searchParams.set('categoryId', String(categoryId)) - } - if (brandId) { - url.searchParams.set('brandId', String(brandId)) - } - if (sort) { - url.searchParams.set('sort', String(sort)) - } - - console.log("url:", url.pathname + url.search); + url.searchParams.set('search', String(search)) + url.searchParams.set('categoryId', String(categoryId)) + url.searchParams.set('brandId', String(brandId)) + url.searchParams.set('sort', String(sort)) return fetch({ url: url.pathname + url.search,