From 80956a840e04d3b71afb2c4301a260c5a6b8f42b Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Mon, 25 Apr 2016 00:30:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=BB=D0=B5=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B7=D0=BB=D0=BE=D0=B3=D0=B8=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=D1=81=D0=B5=D1=85=20=D0=B0=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D1=8B?= =?UTF-8?q?=D1=85=20=D1=83=D1=81=D1=82=D1=80=D0=BE=D0=B9=D1=81=D1=82=D0=B2?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D1=81=D0=BC=D0=B5=D0=BD=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=BE=D0=BB=D1=8F=20(=D0=BF=D0=BE=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B1=D0=B5=D0=B7=20=D0=B8=D0=BC=D0=BF=D0=BB=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=D1=86=D0=B8=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/auth/actions.js | 2 +- src/components/user/actions.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/auth/actions.js b/src/components/auth/actions.js index 9b48f44..ae800d2 100644 --- a/src/components/auth/actions.js +++ b/src/components/auth/actions.js @@ -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]]; diff --git a/src/components/user/actions.js b/src/components/user/actions.js index 2c26707..ad99a83 100644 --- a/src/components/user/actions.js +++ b/src/components/user/actions.js @@ -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({