diff --git a/app/api/paste/[id]/route.ts b/app/api/paste/[id]/route.ts index 23bf75f..f7f112c 100644 --- a/app/api/paste/[id]/route.ts +++ b/app/api/paste/[id]/route.ts @@ -10,7 +10,7 @@ export async function GET( request: NextRequest, context: { params: Promise<{ id: string }> } ) { - const { id: pasteId } = await context.params; // ✅ await obligatoire + const { id: pasteId } = await context.params; if (!pasteId) { return NextResponse.json({ error: 'Invalid ID' }, { status: 400 }); diff --git a/app/api/user-pastes/route.ts b/app/api/user-pastes/route.ts index 7b6b84a..65ff66b 100644 --- a/app/api/user-pastes/route.ts +++ b/app/api/user-pastes/route.ts @@ -1,5 +1,6 @@ import { authOptions } from '@/lib/auth'; import { prisma } from '@/lib/prisma'; +import { Prisma } from '@prisma/client'; import { getServerSession } from 'next-auth'; import { NextResponse } from 'next/server'; @@ -23,7 +24,7 @@ export async function GET(req: Request) { ? { title: { contains: search, - mode: 'insensitive', + mode: Prisma.QueryMode.insensitive, }, } : {}), @@ -42,4 +43,4 @@ export async function GET(req: Request) { ]); return NextResponse.json({ pastes, total }); -} +} \ No newline at end of file