summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-02 20:33:41 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-02 20:33:41 +1000
commitbf69f23e813210cb07a77115ba22a048af647370 (patch)
tree33ee8654095ac44d3163fa37fa3eba5cbedd7e74
parentadd try/catch to fetch in slowcord status monitor (diff)
downloadserver-bf69f23e813210cb07a77115ba22a048af647370.tar.xz
Added sessions to /-/monitorz
-rw-r--r--api/src/routes/-/monitorz.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/src/routes/-/monitorz.ts b/api/src/routes/-/monitorz.ts
index a8f2e3c3..f85cd099 100644
--- a/api/src/routes/-/monitorz.ts
+++ b/api/src/routes/-/monitorz.ts
@@ -1,5 +1,6 @@
 import { Router, Response, Request } from "express";
 import { route } from "@fosscord/api";
+import { Session } from "@fosscord/util";
 import os from "os";
 
 const router = Router();
@@ -10,6 +11,7 @@ router.get("/", route({ right: "OPERATOR" }), async (req: Request, res: Response
 		procUptime: process.uptime(),
 		sysUptime: os.uptime(),
 		memPercent: 100 - ((os.freemem() / os.totalmem()) * 100),
+		sessions: await Session.count(),
 	})
 })