feat: include wattHours, tdpMax, and batteryLife in hardware and game stats APIs

This commit is contained in:
2026-05-09 22:25:34 +08:00
parent 666219614b
commit 02bdbe2825
3 changed files with 68 additions and 5 deletions
+4
View File
@@ -31,6 +31,8 @@ export default async function DevicesPage() {
deviceType: hardware.deviceType,
image: hardware.image,
sortOrder: hardware.sortOrder,
wattHours: hardware.wattHours,
tdpMax: hardware.tdpMax,
})
.from(hardware)
.orderBy(hardware.sortOrder)
@@ -102,6 +104,8 @@ export default async function DevicesPage() {
gameCount: stats?.gameCount ?? 0,
verifiedCount: stats?.verifiedCount ?? 0,
bestGame: bestGame ?? null,
wattHours: device.wattHours ? Number(device.wattHours) : null,
tdpMax: device.tdpMax ? Number(device.tdpMax) : null,
}
})