summary refs log tree commit diff
path: root/src/routes/users/@me/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/users/@me/index.ts')
-rw-r--r--src/routes/users/@me/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/users/@me/index.ts b/src/routes/users/@me/index.ts

index 25a05da3..185e44d4 100644 --- a/src/routes/users/@me/index.ts +++ b/src/routes/users/@me/index.ts
@@ -14,7 +14,7 @@ router.get("/", async (req: Request, res: Response) => { router.patch("/", check(UserModifySchema), async (req: Request, res: Response) => { const body = req.body as UserModifySchema; - body.avatar = await handleFile(body.avatar as string); + body.avatar = await handleFile(`/avatars/${req.user_id}`, body.avatar as string); const user = await UserModel.findOneAndUpdate({ id: req.user_id }, body, { projection: PublicUserProjection }).exec(); // TODO: dispatch user update event