diff options
Diffstat (limited to 'index.ts')
-rw-r--r-- | index.ts | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -32,7 +32,7 @@ app.get("/json", async (req, res) => { name: os.hostname, cpu: { processors: cpu.processors, - model: `${cpu.manufacturer} ${cpu.brand}`, + model: `${cpu.manufacturer} ${cpu.brand}`.trim(), cores: cpu.cores, speed: cpuSpeed.avg, temperature: temp.main, @@ -58,11 +58,11 @@ app.get("/json", async (req, res) => { os: { name: nodeOS.platform() === "win32" ? os.platform - : os.distro, - version: os.release + : (nodeOS.platform().endsWith("bsd") ? nodeOS.type() : os.distro), + version: os.release !== "unknown" ? os.release : os.kernel }, uptime: uptime, - version: "1.1.0" + version: "1.2.0" }); }); @@ -78,4 +78,4 @@ refresh().then(() => { : 3000 )) }); -})
\ No newline at end of file +}) |