Добавлено поле для разлогивания всех авторизованных устройств при смене пароля (пока без имплементации)

This commit is contained in:
ErickSkrauch 2016-04-25 00:30:10 +03:00
parent 4a484027de
commit 80956a840e
2 changed files with 4 additions and 3 deletions

View File

@ -49,7 +49,7 @@ export function changePassword({
newRePassword = ''
}) {
return wrapInLoader((dispatch) =>
dispatch(changeUserPassword({password, newPassword, newRePassword}))
dispatch(changeUserPassword({password, newPassword, newRePassword, logoutAll : false}))
.catch((resp) => {
if (resp.errors) {
const errorMessage = resp.errors[Object.keys(resp.errors)[0]];

View File

@ -47,12 +47,13 @@ export function fetchUserData() {
export function changePassword({
password = '',
newPassword = '',
newRePassword = ''
newRePassword = '',
logoutAll = true,
}) {
return (dispatch) =>
request.post(
'/api/accounts/change-password',
{password, newPassword, newRePassword}
{password, newPassword, newRePassword, logoutAll}
)
.then((resp) => {
dispatch(updateUser({