diff options
Diffstat (limited to 'api/src/routes/guilds/#guild_id/index.ts')
-rw-r--r-- | api/src/routes/guilds/#guild_id/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/guilds/#guild_id/index.ts b/api/src/routes/guilds/#guild_id/index.ts index 1afa603f..87103caa 100644 --- a/api/src/routes/guilds/#guild_id/index.ts +++ b/api/src/routes/guilds/#guild_id/index.ts @@ -48,7 +48,7 @@ router.patch("/", check(GuildUpdateSchema), async (req: Request, res: Response) 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) + const guild = await GuildModel.findOneAndUpdate({ id: guild_id }, body, { new: true }) .populate({ path: "joined_at", match: { id: req.user_id } }) .exec(); |