refacto: types big review
This commit is contained in:
@@ -3,10 +3,10 @@ import { BookService } from "@/lib/services/book.service";
|
||||
import { ERROR_CODES } from "@/constants/errorCodes";
|
||||
import { ERROR_MESSAGES } from "@/constants/errorMessages";
|
||||
import { AppError } from "@/utils/errors";
|
||||
|
||||
import { KomgaBookWithPages } from "@/types/komga";
|
||||
export async function GET(request: Request, { params }: { params: { bookId: string } }) {
|
||||
try {
|
||||
const data = await BookService.getBook(params.bookId);
|
||||
const data: KomgaBookWithPages = await BookService.getBook(params.bookId);
|
||||
return NextResponse.json(data);
|
||||
} catch (error) {
|
||||
console.error("API Books - Erreur:", error);
|
||||
|
||||
Reference in New Issue
Block a user