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

@@ -4,12 +4,15 @@ import { ERROR_CODES } from "@/constants/errorCodes";
import { AppError } from "@/utils/errors";
import type { KomgaSeries } from "@/types/komga";
import { getErrorMessage } from "@/utils/errors";
import type { NextRequest } from "next/server";
export const dynamic = "force-dynamic";
export async function GET(request: Request, { params }: { params: { seriesId: string } }) {
export async function GET(request: NextRequest) {
try {
const series: KomgaSeries = await SeriesService.getSeries(params.seriesId);
const params = request.nextUrl.searchParams;
const seriesId: string = params.get("seriesId") || "";
const series: KomgaSeries = await SeriesService.getSeries(seriesId);
return NextResponse.json(series);
} catch (error) {
console.error("API Series - Erreur:", error);