Merge pull request 'fix: Exclude id field from noteData in update route' (#7) from develop into main
Some checks failed
Personal/recall/pipeline/head There was a failure building this commit
Some checks failed
Personal/recall/pipeline/head There was a failure building this commit
Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user