feat: now support make any record starred

This commit is contained in:
2025-07-02 21:39:41 +08:00
parent 6e2976e234
commit acde78f4a0
8 changed files with 618 additions and 129 deletions
+10 -1
View File
@@ -243,10 +243,19 @@ async function handleGetScreenshots(req: NextRequest) {
return NextResponse.json({ error: '未找到主机记录' }, { status: 404 })
}
// Convert BigInt to string in windows.memory field
const serializedRecords = records.map(record => ({
...record,
windows: record.windows.map(window => ({
...window,
memory: window.memory.toString()
}))
}))
return NextResponse.json({
hostname,
lastUpdate: host.lastUpdate,
records,
records: serializedRecords,
total: records.length
})