feat: now support make any record starred
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user