fix: types of nj15

This commit is contained in:
Julien Froidefond
2025-03-02 14:40:15 +01:00
parent a4b521fe2e
commit e60b48d549
27 changed files with 133 additions and 100 deletions

View File

@@ -1,13 +1,16 @@
import type { NextRequest} from "next/server";
import type { NextRequest } from "next/server";
import { NextResponse } from "next/server";
import { BookService } from "@/lib/services/book.service";
import { ERROR_CODES } from "@/constants/errorCodes";
import { AppError } from "@/utils/errors";
import { getErrorMessage } from "@/utils/errors";
export async function GET(request: NextRequest, { params }: { params: { bookId: string } }) {
export async function GET(request: NextRequest) {
try {
const response = await BookService.getCover(params.bookId);
const params = request.nextUrl.searchParams;
const bookId: string = params.get("bookId") || "";
const response = await BookService.getCover(bookId);
return response;
} catch (error) {
console.error("Erreur lors de la récupération de la miniature du livre:", error);