mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-11 23:58:46 +00:00
Add uptime to resources widget
This commit is contained in:
parent
f46addf20a
commit
b51af4377f
4 changed files with 76 additions and 1 deletions
|
@ -41,6 +41,13 @@ export default async function handler(req, res) {
|
|||
});
|
||||
}
|
||||
|
||||
if (type === "uptime") {
|
||||
const timeData = await si.time();
|
||||
return res.status(200).json({
|
||||
uptime: timeData.uptime
|
||||
});
|
||||
}
|
||||
|
||||
return res.status(400).json({
|
||||
error: "invalid type",
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue