Fix notebook drag highlight and add drag-to-tag and drag-to-trash support

This commit is contained in:
chrisf committed 2026-10-26 10:29:18 -06:00
1 parent 0f24af880b
commit 2cc202ce03
2 files changed
+304 -87

No files matched your search

+13
View File
@@ -188,6 +188,19 @@ export async function PATCH(
}
}
if (body.addTagId && typeof body.addTagId === 'string') {
await prisma.noteTag.createMany({
data: [{ noteId: id, tagId: body.addTagId }],
skipDuplicates: true,
});
}
if (body.removeTagId && typeof body.removeTagId === 'string') {
await prisma.noteTag.deleteMany({
where: { noteId: id, tagId: body.removeTagId },
});
}
const updated = await prisma.note.update({
where: { id },
data,