diff options
author | Chocobozzz <me@florianbigard.com> | 2019-06-11 14:30:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-06-11 14:31:12 +0200 |
commit | 0ba5f5baade94a051710d9d9d408ac8083c14ac6 (patch) | |
tree | e470a2b546d1d1ac9796b6c8ae3afffccd0aca6c /server/middlewares/validators/users.ts | |
parent | d1ab89deb79f70c439b58750d044d9cadf1194e5 (diff) | |
download | PeerTube-0ba5f5baade94a051710d9d9d408ac8083c14ac6.tar.gz PeerTube-0ba5f5baade94a051710d9d9d408ac8083c14ac6.tar.zst PeerTube-0ba5f5baade94a051710d9d9d408ac8083c14ac6.zip |
Add ability to change email in client
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r-- | server/middlewares/validators/users.ts | 2 |
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.' }) |