fix: Exclude id field from noteData in update route

This commit is contained in:
2026-03-23 23:08:17 -03:00
parent 9ca98d96db
commit 3a523aafde

View File

@@ -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) {