chore: snapshot before performance optimization
This commit is contained in:
@@ -454,7 +454,7 @@ Deine Antwort (nur JSON):
|
||||
let names: string[] = []
|
||||
if (note.labels) {
|
||||
try {
|
||||
const parsed = JSON.parse(note.labels) as unknown
|
||||
const parsed = note.labels as unknown
|
||||
names = Array.isArray(parsed)
|
||||
? parsed.filter((n): n is string => typeof n === 'string' && n.trim().length > 0)
|
||||
: []
|
||||
@@ -471,7 +471,7 @@ Deine Antwort (nur JSON):
|
||||
await prisma.note.update({
|
||||
where: { id: noteId },
|
||||
data: {
|
||||
labels: JSON.stringify(names),
|
||||
labels: names as any,
|
||||
labelRelations: {
|
||||
connect: { id: label.id },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user