Compare commits

...

2 Commits

Author SHA1 Message Date
darroyo b7c4df42e0 Merge pull request 'fix: Exclude id field from noteData in update route' (#7) from develop into main
Personal/recall/pipeline/head There was a failure building this commit
Reviewed-on: #7
2026-03-24 02:09:07 +00:00
darroyo 3a523aafde fix: Exclude id field from noteData in update route 2026-03-23 23:08:17 -03:00
+1 -1
View File
@@ -33,7 +33,7 @@ export async function PUT(req: NextRequest, { params }: { params: Promise<{ id:
throw new ValidationError(result.error.issues) 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 } }) const existingNote = await prisma.note.findUnique({ where: { id } })
if (!existingNote) { if (!existingNote) {