Correct the invite response

This commit is contained in:
Thesourtimes 2022-01-06 22:14:00 +03:00
parent aaf5df14e1
commit a8bd9cc795

View File

@ -19,7 +19,7 @@ router.post("/:code", route({}), async (req: Request, res: Response) => {
const { features } = await Guild.findOneOrFail({ id: 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)
if(features.includes("INTERNAL_EMPLOYEE_ONLY") && (public_flags & 1) !== 1) throw new HTTPError("The Maze isn't meant for you.", 401)
const invite = await Invite.joinGuild(req.user_id, code);