From 4a63e1560c07c938ec74f14e5076ec4e69de7ce6 Mon Sep 17 00:00:00 2001 From: xnacly Date: Fri, 3 Sep 2021 21:33:44 +0200 Subject: added big todo list to Guild.ts (big chungus) --- api/src/routes/discoverable-guilds.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 api/src/routes/discoverable-guilds.ts (limited to 'api/src/routes') diff --git a/api/src/routes/discoverable-guilds.ts b/api/src/routes/discoverable-guilds.ts new file mode 100644 index 00000000..6ff43cdc --- /dev/null +++ b/api/src/routes/discoverable-guilds.ts @@ -0,0 +1,14 @@ +import { Guild } from "@fosscord/util"; +import { Router, Request, Response } from "express"; +import { In } from "typeorm"; + +const router = Router(); + +router.get("/", async (req: Request, res: Response) => { + const { limit } = req.params; + + const guilds = await Guild.find({ where: { features: "PENIS" } }); //, take: Math.abs(Number(limit)) }); + res.send({ guilds: guilds }); +}); + +export default router; -- cgit 1.5.1