mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Add uptime to resources widget
This commit is contained in:
@@ -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",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user