Refactor Admin and Settings UI to Ethereal Precision aesthetic and improve note import/export functionality
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m4s
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m4s
This commit is contained in:
@@ -111,11 +111,12 @@ export async function POST(req: NextRequest) {
|
||||
const mappedNotebookId = notebookIdMap.get(note.notebookId) || null
|
||||
|
||||
// Get label IDs
|
||||
const labelNames = (note.labels || note.labelRelations || []).map((l: any) => l.name).filter(Boolean)
|
||||
const labels = await prisma.label.findMany({
|
||||
where: {
|
||||
userId: session.user.id,
|
||||
name: {
|
||||
in: note.labels.map((l: any) => l.name)
|
||||
in: labelNames
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -125,8 +126,14 @@ export async function POST(req: NextRequest) {
|
||||
data: {
|
||||
userId: session.user.id,
|
||||
title: note.title || 'Untitled',
|
||||
content: note.content,
|
||||
content: note.content || '',
|
||||
color: note.color || 'default',
|
||||
isPinned: note.isPinned || false,
|
||||
isArchived: note.isArchived || false,
|
||||
type: note.type || 'richtext',
|
||||
checkItems: note.checkItems || null,
|
||||
images: note.images || null,
|
||||
links: note.links || null,
|
||||
notebookId: mappedNotebookId,
|
||||
labelRelations: {
|
||||
connect: labels.map(label => ({ id: label.id }))
|
||||
|
||||
Reference in New Issue
Block a user