fix: Exclude id field from noteData in update route #7

Merged
darroyo merged 1 commits from develop into main 2026-03-24 02:09:07 +00:00
Showing only changes of commit 3a523aafde - Show all commits

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