From 3a523aafde4aad23037e17076ea53d1bb6686989 Mon Sep 17 00:00:00 2001 From: Daniel Arroyo Date: Mon, 23 Mar 2026 23:08:17 -0300 Subject: [PATCH] fix: Exclude id field from noteData in update route --- src/app/api/notes/[id]/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/notes/[id]/route.ts b/src/app/api/notes/[id]/route.ts index 3f49288..15cab66 100644 --- a/src/app/api/notes/[id]/route.ts +++ b/src/app/api/notes/[id]/route.ts @@ -33,7 +33,7 @@ export async function PUT(req: NextRequest, { params }: { params: Promise<{ id: throw new ValidationError(result.error.issues) } - const { tags, ...noteData } = result.data + const { tags, id: _, ...noteData } = result.data const existingNote = await prisma.note.findUnique({ where: { id } }) if (!existingNote) {