summary refs log tree commit diff
path: root/api/src/routes
diff options
context:
space:
mode:
authorxnacly <matteogropp@protonmail.com>2021-09-03 21:33:44 +0200
committerxnacly <matteogropp@protonmail.com>2021-09-03 21:33:44 +0200
commit4a63e1560c07c938ec74f14e5076ec4e69de7ce6 (patch)
tree1ae493c750b6d0056e3ad0fa5ed2eedc568b8ed9 /api/src/routes
parentreplace '@me' with req.user_id in guild join (diff)
downloadserver-4a63e1560c07c938ec74f14e5076ec4e69de7ce6.tar.xz
added big todo list to Guild.ts (big chungus)
Diffstat (limited to '')
-rw-r--r--api/src/routes/discoverable-guilds.ts14
1 files changed, 14 insertions, 0 deletions
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;