summary refs log tree commit diff
path: root/api/src/routes/discoverable-guilds.ts
diff options
context:
space:
mode:
authordevelopomp <developomp@gmail.com>2021-10-20 09:13:22 +0900
committerdevelopomp <developomp@gmail.com>2021-10-20 09:13:22 +0900
commit2ce3fbc6525cd8c1ddd060c54f833c5b6a2623c7 (patch)
tree717ad10f33462c0298733407d8773c595828c32f /api/src/routes/discoverable-guilds.ts
parentprettier formatted /bundle (diff)
downloadserver-2ce3fbc6525cd8c1ddd060c54f833c5b6a2623c7.tar.xz
prettier formatted /api
Diffstat (limited to 'api/src/routes/discoverable-guilds.ts')
-rw-r--r--api/src/routes/discoverable-guilds.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/api/src/routes/discoverable-guilds.ts b/api/src/routes/discoverable-guilds.ts
index b626b084..1cf56f84 100644
--- a/api/src/routes/discoverable-guilds.ts
+++ b/api/src/routes/discoverable-guilds.ts
@@ -3,7 +3,6 @@ import { Guild, Config } from "@fosscord/util";
 import { Router, Request, Response } from "express";
 import { route } from "@fosscord/api";
 
-
 const router = Router();
 
 router.get("/", route({}), async (req: Request, res: Response) => {
@@ -12,7 +11,9 @@ router.get("/", route({}), async (req: Request, res: Response) => {
 	// ! 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 = showAllGuilds ? await Guild.find({take: Math.abs(Number(limit || 20))}) : await Guild.find({ where: `"features" LIKE '%COMMUNITY%'`, take: Math.abs(Number(limit || 20)) });
+	const guilds = showAllGuilds
+		? await Guild.find({ take: Math.abs(Number(limit || 20)) })
+		: await Guild.find({ where: `"features" LIKE '%COMMUNITY%'`, take: Math.abs(Number(limit || 20)) });
 	res.send({ guilds: guilds });
 });