summary refs log tree commit diff
path: root/api/src/routes/users/@me/index.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-31 17:58:47 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-31 17:58:47 +0200
commit3f66c101789f9a6d065490d3e3265c764698113f (patch)
tree97b1ef821e2dd8124e5d38a822c08efe21e7eaa2 /api/src/routes/users/@me/index.ts
parent:sparkles: channel recipients (diff)
downloadserver-3f66c101789f9a6d065490d3e3265c764698113f.tar.xz
:bug: db query fixes
Diffstat (limited to 'api/src/routes/users/@me/index.ts')
-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 274cfb24..d5a5723c 100644
--- a/api/src/routes/users/@me/index.ts
+++ b/api/src/routes/users/@me/index.ts
@@ -37,7 +37,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 new User({ ...body }, { id: req.user_id }).save();
+	const user = await new User({ ...body, id: req.user_id }).save();
 	// TODO: dispatch user update event
 
 	res.json(user);