Compare commits
2 Commits
a8ef158fd7
...
b7c4df42e0
| Author | SHA1 | Date | |
|---|---|---|---|
| b7c4df42e0 | |||
| 3a523aafde |
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user