mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 00:50:23 -05:00
parent
31ae35e9a6
commit
9b814354a4
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue