Add cputemp to resources widget

This commit is contained in:
shamoon 2023-03-05 14:11:43 -08:00
parent d4a3ba84e9
commit f46addf20a
6 changed files with 101 additions and 2 deletions

View file

@ -35,6 +35,12 @@ export default async function handler(req, res) {
});
}
if (type === "cputemp") {
return res.status(200).json({
cputemp: await si.cpuTemperature(),
});
}
return res.status(400).json({
error: "invalid type",
});