diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts index e034aedef..f91b2f37b 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts | |||
@@ -43,22 +43,23 @@ export class MyAccountChangePasswordComponent extends FormReactive implements On | |||
43 | const currentPassword = this.form.value[ 'current-password' ] | 43 | const currentPassword = this.form.value[ 'current-password' ] |
44 | const newPassword = this.form.value[ 'new-password' ] | 44 | const newPassword = this.form.value[ 'new-password' ] |
45 | 45 | ||
46 | this.userService.changePassword(currentPassword, newPassword).subscribe( | 46 | this.userService.changePassword(currentPassword, newPassword) |
47 | () => { | 47 | .subscribe({ |
48 | this.notifier.success($localize`Password updated.`) | 48 | next: () => { |
49 | this.notifier.success($localize`Password updated.`) | ||
49 | 50 | ||
50 | this.form.reset() | 51 | this.form.reset() |
51 | this.error = null | 52 | this.error = null |
52 | }, | 53 | }, |
53 | 54 | ||
54 | err => { | 55 | error: err => { |
55 | if (err.status === 401) { | 56 | if (err.status === 401) { |
56 | this.error = $localize`You current password is invalid.` | 57 | this.error = $localize`You current password is invalid.` |
57 | return | 58 | return |
58 | } | 59 | } |
59 | 60 | ||
60 | this.error = err.message | 61 | this.error = err.message |
61 | } | 62 | } |
62 | ) | 63 | }) |
63 | } | 64 | } |
64 | } | 65 | } |