From 25060ed06eb3fdc2c77b8484f34bdbdf58f1f08b Mon Sep 17 00:00:00 2001 From: xnacly Date: Fri, 3 Sep 2021 23:31:56 +0200 Subject: [PATCH] fixed /discoverable-guilds --- api/src/routes/discoverable-guilds.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/routes/discoverable-guilds.ts b/api/src/routes/discoverable-guilds.ts index 79971917..0808727f 100644 --- a/api/src/routes/discoverable-guilds.ts +++ b/api/src/routes/discoverable-guilds.ts @@ -7,7 +7,10 @@ const router = Router(); router.get("/", async (req: Request, res: Response) => { const { limit } = req.params; - const guilds = await Guild.find({ where: { features: "DISCOVERABLE" } }); //, take: Math.abs(Number(limit)) }); + // ! this only works using SQL querys + // TODO: implement this with default typeorm query + // const guilds = await Guild.find({ where: { features: "DISCOVERABLE" } }); //, take: Math.abs(Number(limit)) }); + const guilds = await Guild.find({ where: `"features" LIKE 'COMMUNITY'`, take: Math.abs(Number(limit)) }); res.send({ guilds: guilds }); });