1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add ability to change email in client

This commit is contained in:
Chocobozzz 2019-06-11 14:30:49 +02:00
parent d1ab89deb7
commit 0ba5f5baad
No known key found for this signature in database
GPG key ID: 583A612D890159BE
13 changed files with 189 additions and 17 deletions

View file

@ -205,7 +205,7 @@ const usersUpdateMeValidator = [
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking usersUpdateMe parameters', { parameters: omit(req.body, 'password') })
if (req.body.password) {
if (req.body.password || req.body.email) {
if (!req.body.currentPassword) {
return res.status(400)
.send({ error: 'currentPassword parameter is missing.' })