summary refs log tree commit diff
path: root/api/src/routes/guilds/index.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-02 19:50:05 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-02 19:50:05 +0200
commit562a53d6bbd4fd3da41eeb94dc4c7ad31cf9a67e (patch)
tree7e9a1ac62489adeb6e716bf6223e34d0576d5218 /api/src/routes/guilds/index.ts
parent:art: update openapi title (diff)
downloadserver-562a53d6bbd4fd3da41eeb94dc4c7ad31cf9a67e.tar.xz
:sparkles: add user_id field to Member
Diffstat (limited to '')
-rw-r--r--api/src/routes/guilds/index.ts2
1 files changed, 1 insertions, 1 deletions
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); }