diff options
author | Thesourtimes <cckhmck@gmail.com> | 2021-12-07 17:35:55 +0300 |
---|---|---|
committer | Thesourtimes <cckhmck@gmail.com> | 2021-12-07 17:35:55 +0300 |
commit | 62d992893cef0ce17b5c2f38a0dbc00693da28be (patch) | |
tree | d6a987d46566d37f0929fa7e687e429ae2a25f5d /api/src/routes | |
parent | Merge pull request #536 from Thesourtimes/master (diff) | |
download | server-62d992893cef0ce17b5c2f38a0dbc00693da28be.tar.xz |
Fix previous commit
Diffstat (limited to 'api/src/routes')
-rw-r--r-- | api/src/routes/invites/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/invites/index.ts b/api/src/routes/invites/index.ts index c327a63e..a9ec2421 100644 --- a/api/src/routes/invites/index.ts +++ b/api/src/routes/invites/index.ts @@ -15,7 +15,7 @@ router.get("/:code", route({}), async (req: Request, res: Response) => { router.post("/:code", route({}), async (req: Request, res: Response) => { const { code } = req.params; - const { features } = await Guild.findOneOrFail({where: { code }}); + const { features } = await Guild.findOneOrFail({ id: (await Invite.findOneOrFail({ code })).guild_id}); const { public_flags } = await User.findOneOrFail({ id: req.user_id }); if(features.includes("INTERNAL_EMPLOYEE_ONLY") && (public_flags & 1) !== 1) throw new HTTPError("You are not allowed to join this guild.", 401) |