From 59a7888cc1b34ced821c22acf8f504ec2db35482 Mon Sep 17 00:00:00 2001 From: UltraLionFr Date: Wed, 20 Aug 2025 19:32:43 +0200 Subject: [PATCH] update prisma --- app/api/user-pastes/route.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/api/user-pastes/route.ts b/app/api/user-pastes/route.ts index 7b6b84a..d47e8ec 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 type { Prisma } from '@prisma/client'; import { getServerSession } from 'next-auth'; import { NextResponse } from 'next/server'; @@ -17,13 +18,13 @@ export async function GET(req: Request) { const search = searchParams.get('q') || ''; - const filter = { + const filter: Prisma.PasteWhereInput = { createdBy: session.user.id, ...(search ? { title: { contains: search, - mode: 'insensitive', + mode: 'insensitive' as Prisma.QueryMode, }, } : {}),