summary refs log tree commit diff
path: root/api/src/routes/users
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/routes/users')
-rw-r--r--api/src/routes/users/@me/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/users/@me/index.ts b/api/src/routes/users/@me/index.ts
index c073e78a..6ebc6634 100644
--- a/api/src/routes/users/@me/index.ts
+++ b/api/src/routes/users/@me/index.ts
@@ -38,7 +38,7 @@ router.patch("/", check(UserModifySchema), async (req: Request, res: Response) =
 	if (body.avatar) body.avatar = await handleFile(`/avatars/${req.user_id}`, body.avatar as string);
 	if (body.banner) body.banner = await handleFile(`/banners/${req.user_id}`, body.banner as string);
 
-	const user = await UserModel.findOneAndUpdate({ id: req.user_id }, body, { projection: UserUpdateProjection }).exec();
+	const user = await UserModel.findOneAndUpdate({ id: req.user_id }, body, { projection: UserUpdateProjection, new: true }).exec();
 	// TODO: dispatch user update event
 
 	res.json(toObject(user));