aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-17 11:27:47 +0200
committerChocobozzz <me@florianbigard.com>2021-08-17 14:01:45 +0200
commit1378c0d343028f3d40d7d795422684ab9e6a1599 (patch)
tree08062b84a38a7e2dfe0aa674e7ca8e1b7321044e /client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
parentc186a67f90203af6bfa434f026efdc99193bcd65 (diff)
downloadPeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.gz
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.tar.zst
PeerTube-1378c0d343028f3d40d7d795422684ab9e6a1599.zip
Fix client lint
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.ts29
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}