perf: promise all on ssr pages

This commit is contained in:
Julien Froidefond
2025-10-07 18:03:53 +02:00
parent 6f1889931c
commit ecaf804d02
2 changed files with 8 additions and 15 deletions

View File

@@ -42,14 +42,10 @@ async function getLibrarySeries(
try {
const pageIndex = page - 1;
const series: LibraryResponse<KomgaSeries> = await LibraryService.getLibrarySeries(
libraryId,
pageIndex,
size,
unreadOnly,
search
);
const library: KomgaLibrary = await LibraryService.getLibrary(libraryId);
const [series, library] = await Promise.all([
LibraryService.getLibrarySeries(libraryId, pageIndex, size, unreadOnly, search),
LibraryService.getLibrary(libraryId)
]);
return { data: series, library };
} catch (error) {