diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-31 17:57:19 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-31 17:57:19 +0200 |
commit | 1c897af1beeb5728fbfc99c6c43e4360169b03c8 (patch) | |
tree | ac66706abf107ac693a4b19ef8ce32828a8c3707 /api/src/routes/guilds/#guild_id/index.ts | |
parent | :zap: use insert instead of save (diff) | |
download | server-1c897af1beeb5728fbfc99c6c43e4360169b03c8.tar.xz |
fix member roles
Diffstat (limited to 'api/src/routes/guilds/#guild_id/index.ts')
-rw-r--r-- | api/src/routes/guilds/#guild_id/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/routes/guilds/#guild_id/index.ts b/api/src/routes/guilds/#guild_id/index.ts index d205b164..6f55be3b 100644 --- a/api/src/routes/guilds/#guild_id/index.ts +++ b/api/src/routes/guilds/#guild_id/index.ts @@ -14,8 +14,8 @@ router.get("/", async (req: Request, res: Response) => { const [guild, member_count, member] = await Promise.all([ Guild.findOneOrFail({ id: guild_id }), - Member.count({ guild_id: guild_id, id: req.user_id }), - Member.findOneOrFail(req.user_id) + Member.count({ guild: { id: guild_id }, id: req.user_id }), + Member.findOneOrFail({ id: req.user_id }) ]); if (!member_count) throw new HTTPError("You are not a member of the guild you are trying to access", 401); |