1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 12:42:44 +01:00

JOIN_GUILDS is not the right flag there

This commit is contained in:
Erkin Alp Güney 2022-06-26 14:26:36 +03:00 committed by GitHub
parent 652bb40e8c
commit 84b631e9b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ router.get("/:code", route({}), async (req: Request, res: Response) => {
res.status(200).send(invite);
});
router.post("/:code", route({right: "JOIN_GUILDS"}), async (req: Request, res: Response) => {
router.post("/:code", route({right: "USE_MASS_INVITES"}), async (req: Request, res: Response) => {
const { code } = req.params;
const { guild_id } = await Invite.findOneOrFail({ code })
const { features } = await Guild.findOneOrFail({ id: guild_id});