mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-15 20:55:56 +05:30
Добавлено поле для разлогивания всех авторизованных устройств при смене пароля (пока без имплементации)
This commit is contained in:
parent
4a484027de
commit
80956a840e
@ -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]];
|
||||
|
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user