Fixed bug where changing a user's password would change the admin's password

This commit is contained in:
Isaac Grynsztein
2020-07-01 17:26:32 -04:00
parent 7e24180f03
commit e81d0cab42

View File

@@ -2901,7 +2901,7 @@ app.post('/api/auth/jwtAuth'
, auth_api.returnAuthResponse
);
app.post('/api/auth/changePassword', optionalJwt, async (req, res) => {
let user_uid = req.user.uid;
let user_uid = req.body.user_uid;
let password = req.body.new_password;
let success = await auth_api.changeUserPassword(user_uid, password);
res.send({success: success});