From 9fda915b376a2f3853a26aa4c55e41b7a42d6a3a Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 21 Aug 2021 16:47:22 +0200 Subject: :construction: typeorm --- api/src/routes/users/@me/settings.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'api/src') diff --git a/api/src/routes/users/@me/settings.ts b/api/src/routes/users/@me/settings.ts index 5664fc2f..f045a010 100644 --- a/api/src/routes/users/@me/settings.ts +++ b/api/src/routes/users/@me/settings.ts @@ -8,7 +8,8 @@ const router = Router(); router.patch("/", check(UserSettingsSchema), async (req: Request, res: Response) => { const body = req.body as UserSettings; - await UserModel.updateOne({ id: req.user_id }, body).exec(); + // only users can update user settings + await UserModel.updateOne({ id: req.user_id, bot: false }, body).exec(); res.sendStatus(204); }); -- cgit 1.4.1