mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-14 20:25: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) {
|
||||
case 0:
|
||||
return accounts.requestEmailChange().catch(handleErrors());
|
||||
return accounts.requestEmailChange(data).catch(handleErrors());
|
||||
case 1:
|
||||
return accounts.setNewEmail(data).catch(handleErrors('/profile/change-email'));
|
||||
case 2:
|
||||
|
@ -34,9 +34,10 @@ export default {
|
||||
);
|
||||
},
|
||||
|
||||
requestEmailChange() {
|
||||
requestEmailChange({password = ''}) {
|
||||
return request.post(
|
||||
'/api/accounts/change-email/initialize'
|
||||
'/api/accounts/change-email/initialize',
|
||||
{password}
|
||||
);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user