From d29ccaf623910eea90852fa28cd8ec191bd7afff Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 2 Sep 2021 19:50:05 +0200 Subject: :sparkles: add user_id field to Member --- api/src/routes/guilds/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/src/routes/guilds/index.ts') diff --git a/api/src/routes/guilds/index.ts b/api/src/routes/guilds/index.ts index a54b83ba..92525317 100644 --- a/api/src/routes/guilds/index.ts +++ b/api/src/routes/guilds/index.ts @@ -13,7 +13,7 @@ router.post("/", check(GuildCreateSchema), async (req: Request, res: Response) = 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({ user_id: req.user_id }); if (guild_count >= maxGuilds) { throw DiscordApiErrors.MAXIMUM_GUILDS.withParams(maxGuilds); } -- cgit 1.5.1