summary refs log tree commit diff
path: root/api
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
commitdcce4f9c841a81f329e49ab0f23cc597f548e66e (patch)
treefd5edb9eec258d21dd2c68897949a8f071c23e66 /api
parentadd try/catch to fetch in slowcord status monitor (diff)
downloadserver-dcce4f9c841a81f329e49ab0f23cc597f548e66e.tar.xz
Added sessions to /-/monitorz
Diffstat (limited to 'api')
-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(),
 	})
 })