This commit is contained in:
Madeline
2022-10-28 15:25:58 +11:00
parent c00c70985c
commit e991e00f32
35 changed files with 185 additions and 6530 deletions
+21
View File
@@ -0,0 +1,21 @@
import { Router, Request, Response } from "express";
import { route } from "@fosscord/api";
import { Attachment, Config, Guild, Message, RateLimit, Session, User } from "@fosscord/util";
const router = Router();
router.get("/", route({}), async (req: Request, res: Response) => {
res.json({
all_time: {
users: await User.count(),
guilds: await Guild.count(),
messages: await Message.count(),
attachments: await Attachment.count(),
},
now: {
sessions: await Session.count(),
rate_limits: await RateLimit.count(),
}
});
});
export default router;