From 9b814354a4ac101a54bad036373471f6aa98834f Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 14 Feb 2024 20:43:48 -0600 Subject: [PATCH] fix(web): search params (#7123) * fix(web): search params * format --- web/src/routes/(user)/search/+page.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/routes/(user)/search/+page.ts b/web/src/routes/(user)/search/+page.ts index 992d0fda96..e3c99b007b 100644 --- a/web/src/routes/(user)/search/+page.ts +++ b/web/src/routes/(user)/search/+page.ts @@ -10,7 +10,11 @@ export const load = (async (data) => { url.searchParams.get(QueryParameter.SEARCH_TERM) || url.searchParams.get(QueryParameter.QUERY) || undefined; let results: SearchResponseDto | null = null; if (term) { - const response = await search({ ...data.url.searchParams }); + let params = {}; + for (const [key, value] of data.url.searchParams) { + params = { ...params, [key]: value }; + } + const response = await search({ ...params }); let items: AssetResponseDto[] = (data as unknown as { results: SearchResponseDto }).results?.assets.items; if (items) { items.push(...response.assets.items);