aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/middlewares/validators/users.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index a4d4ae46d..ec70fa0fd 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -205,7 +205,7 @@ const usersUpdateMeValidator = [
205 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 205 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
206 logger.debug('Checking usersUpdateMe parameters', { parameters: omit(req.body, 'password') }) 206 logger.debug('Checking usersUpdateMe parameters', { parameters: omit(req.body, 'password') })
207 207
208 if (req.body.password) { 208 if (req.body.password || req.body.email) {
209 if (!req.body.currentPassword) { 209 if (!req.body.currentPassword) {
210 return res.status(400) 210 return res.status(400)
211 .send({ error: 'currentPassword parameter is missing.' }) 211 .send({ error: 'currentPassword parameter is missing.' })