#100: password protection for email change form

This commit is contained in:
SleepWalker 2016-05-22 22:04:52 +03:00
parent 57f3134cd8
commit 594893978b
2 changed files with 4 additions and 3 deletions

View File

@ -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:

View File

@ -34,9 +34,10 @@ export default {
);
},
requestEmailChange() {
requestEmailChange({password = ''}) {
return request.post(
'/api/accounts/change-email/initialize'
'/api/accounts/change-email/initialize',
{password}
);
},