summary refs log tree commit diff
path: root/api/src/routes/guilds/#guild_id/index.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-31 17:57:19 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-31 17:57:19 +0200
commit1c897af1beeb5728fbfc99c6c43e4360169b03c8 (patch)
treeac66706abf107ac693a4b19ef8ce32828a8c3707 /api/src/routes/guilds/#guild_id/index.ts
parent:zap: use insert instead of save (diff)
downloadserver-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.ts4
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);