From 6acfe2775f741f613f92618d622d8d8c8200c527 Mon Sep 17 00:00:00 2001 From: Florian Trayon <26360935+FlorianLeChat@users.noreply.github.com> Date: Sat, 23 Dec 2023 16:47:16 +0100 Subject: [PATCH] Removed static generation of API parameters for React Admin --- app/api/admin/[...resource]/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/admin/[...resource]/route.ts b/app/api/admin/[...resource]/route.ts index ff8d8f2..6f345c3 100644 --- a/app/api/admin/[...resource]/route.ts +++ b/app/api/admin/[...resource]/route.ts @@ -3,10 +3,10 @@ // import prisma from "@/utilities/prisma"; import { auth } from "@/utilities/next-auth"; -import { NextResponse } from "next/server"; +import { NextRequest, NextResponse } from "next/server"; import { type RaPayload, defaultHandler } from "ra-data-simple-prisma"; -const handler = async ( request: Request ) => +const handler = async ( request: NextRequest ) => { // On vérifie d'abord la session de l'utilisateur. const session = await auth();