summary refs log tree commit diff
path: root/src/api/routes/guilds/index.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/api/routes/guilds/index.ts (renamed from api/src/routes/guilds/index.ts)4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/routes/guilds/index.ts b/src/api/routes/guilds/index.ts

index 489dea49..d44cd735 100644 --- a/api/src/routes/guilds/index.ts +++ b/src/api/routes/guilds/index.ts
@@ -24,9 +24,9 @@ router.post("/", route({ body: "GuildCreateSchema", right: "CREATE_GUILDS" }), a const body = req.body as GuildCreateSchema; const { maxGuilds } = Config.get().limits.user; - const guild_count = await Member.count({ id: req.user_id }); + const guild_count = await Member.count({ where: { id: req.user_id } }); const rights = await getRights(req.user_id); - if ((guild_count >= maxGuilds)&&!rights.has("MANAGE_GUILDS")) { + if ((guild_count >= maxGuilds) && !rights.has("MANAGE_GUILDS")) { throw DiscordApiErrors.MAXIMUM_GUILDS.withParams(maxGuilds); }