mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-02-24 19:27:56 +05:30
#100: password protection for email change form
This commit is contained in:
parent
57f3134cd8
commit
594893978b
@ -59,7 +59,7 @@ class ChangeEmailPage extends Component {
|
|||||||
|
|
||||||
switch (step) {
|
switch (step) {
|
||||||
case 0:
|
case 0:
|
||||||
return accounts.requestEmailChange().catch(handleErrors());
|
return accounts.requestEmailChange(data).catch(handleErrors());
|
||||||
case 1:
|
case 1:
|
||||||
return accounts.setNewEmail(data).catch(handleErrors('/profile/change-email'));
|
return accounts.setNewEmail(data).catch(handleErrors('/profile/change-email'));
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -34,9 +34,10 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
requestEmailChange() {
|
requestEmailChange({password = ''}) {
|
||||||
return request.post(
|
return request.post(
|
||||||
'/api/accounts/change-email/initialize'
|
'/api/accounts/change-email/initialize',
|
||||||
|
{password}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user