mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
parent
31ae35e9a6
commit
9b814354a4
@ -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…
x
Reference in New Issue
Block a user