feat: refactor book page to use ClientBookPage component and enhance data fetching with next book information

This commit is contained in:
Julien Froidefond
2025-10-17 16:18:38 +02:00
parent 191f10b8d7
commit 592aadf4ab
4 changed files with 121 additions and 60 deletions

View File

@@ -14,7 +14,9 @@ export async function GET(
const bookId: string = (await params).bookId;
const data: KomgaBookWithPages = await BookService.getBook(bookId);
return NextResponse.json(data);
const nextBook = await BookService.getNextBook(bookId, data.book.seriesId);
return NextResponse.json({ ...data, nextBook });
} catch (error) {
console.error("API Books - Erreur:", error);
if (error instanceof AppError) {