Web: Client: confirm: added passwordHash to co createUser, activateUser

This commit is contained in:
Artem Tarasov 2020-10-07 19:52:25 +03:00
parent 2547a70498
commit e2f3daacec
3 changed files with 5 additions and 5 deletions

View File

@ -117,7 +117,7 @@ class Confirm extends React.PureComponent {
const loginData = { const loginData = {
userName: this.state.email, userName: this.state.email,
password: hash, passwordHash: hash,
}; };
const personalData = { const personalData = {

View File

@ -127,7 +127,7 @@ class Confirm extends React.PureComponent {
const loginData = { const loginData = {
userName: this.state.email, userName: this.state.email,
password: hash, passwordHash: hash,
}; };
const personalData = { const personalData = {

View File

@ -31,7 +31,7 @@ export function createConfirmUser(registerData, loginData, key) {
return api.people return api.people
.createUser(data, key) .createUser(data, key)
.then((user) => dispatch(setCurrentUser(user))) .then((user) => dispatch(setCurrentUser(user)))
.then(() => api.user.login(loginData.userName, loginData.password)) .then(() => api.user.login(loginData.userName, loginData.passwordHash))
.then(() => loadInitInfo(dispatch)); .then(() => loadInitInfo(dispatch));
}; };
} }
@ -51,12 +51,12 @@ export function activateConfirmUser(
return (dispatch) => { return (dispatch) => {
return api.people return api.people
.changePassword(userId, loginData.password, key) .changePassword(userId, loginData.passwordHash, key)
.then((data) => { .then((data) => {
return api.people.updateActivationStatus(activationStatus, userId, key); return api.people.updateActivationStatus(activationStatus, userId, key);
}) })
.then((data) => { .then((data) => {
return dispatch(login(loginData.userName, loginData.password)); return dispatch(login(loginData.userName, loginData.passwordHash));
}) })
.then((data) => { .then((data) => {
return api.people.updateUser(changedData); return api.people.updateUser(changedData);