Merge pull request #191 from BanTheNons/invite-splashes

Implemented invite splashes
This commit is contained in:
Flam3rboy 2021-08-07 21:27:47 +02:00 committed by GitHub
commit bf98804d41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,8 @@ router.patch("/", check(GuildUpdateSchema), async (req: Request, res: Response)
perms.hasThrow("MANAGE_GUILD");
if (body.icon) body.icon = await handleFile(`/icons/${guild_id}`, body.icon);
if(body.banner) body.banner = await handleFile(`/banners/${guild_id}`, body.banner);
if (body.banner) body.banner = await handleFile(`/banners/${guild_id}`, body.banner);
if (body.splash) body.splash = await handleFile(`/splashes/${guild_id}`, body.splash);
const guild = await GuildModel.findOneAndUpdate({ id: guild_id }, body)
.populate({ path: "joined_at", match: { id: req.user_id } })