From 0d23eaba09a4878520bf346af4cead90d76829fc Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 25 Sep 2022 18:24:21 +1000 Subject: Refactor to mono-repo + upgrade packages --- api/src/routes/-/monitorz.ts | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 api/src/routes/-/monitorz.ts (limited to 'api/src/routes/-/monitorz.ts') diff --git a/api/src/routes/-/monitorz.ts b/api/src/routes/-/monitorz.ts deleted file mode 100644 index f85cd099..00000000 --- a/api/src/routes/-/monitorz.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; -import { Session } from "@fosscord/util"; -import os from "os"; - -const router = Router(); - -router.get("/", route({ right: "OPERATOR" }), async (req: Request, res: Response) => { - return res.json({ - load: os.loadavg(), - procUptime: process.uptime(), - sysUptime: os.uptime(), - memPercent: 100 - ((os.freemem() / os.totalmem()) * 100), - sessions: await Session.count(), - }) -}) - -export default router; \ No newline at end of file -- cgit 1.5.1