chore: align infrastructure with server

This commit is contained in:
2026-05-02 17:20:14 +05:00
parent e8c924f63a
commit 73c323685f
36 changed files with 785 additions and 540 deletions
+10 -5
View File
@@ -31,11 +31,16 @@ export default defineEventHandler(async (event) => {
orderBy: { updatedAt: 'desc' }
})
const totalCount = await prisma.canvas.count()
const canvases = canvasList.map(c => ({
...c,
nodeCount: Array.isArray(c.nodes) ? (c.nodes as any[]).length : 0,
nodes: undefined
}))
return {
canvases: canvasList.map(c => ({
...c,
nodeCount: Array.isArray(c.nodes) ? (c.nodes as any[]).length : 0,
nodes: undefined
}))
canvases,
totalCount
}
})