diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-settings.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts index a0f2f28f8..fc7635f38 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | |||
@@ -39,31 +39,31 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { | |||
39 | 39 | ||
40 | onAvatarChange (formData: FormData) { | 40 | onAvatarChange (formData: FormData) { |
41 | this.userService.changeAvatar(formData) | 41 | this.userService.changeAvatar(formData) |
42 | .subscribe( | 42 | .subscribe({ |
43 | data => { | 43 | next: data => { |
44 | this.notifier.success($localize`Avatar changed.`) | 44 | this.notifier.success($localize`Avatar changed.`) |
45 | 45 | ||
46 | this.user.updateAccountAvatar(data.avatar) | 46 | this.user.updateAccountAvatar(data.avatar) |
47 | }, | 47 | }, |
48 | 48 | ||
49 | (err: HttpErrorResponse) => genericUploadErrorHandler({ | 49 | error: (err: HttpErrorResponse) => genericUploadErrorHandler({ |
50 | err, | 50 | err, |
51 | name: $localize`avatar`, | 51 | name: $localize`avatar`, |
52 | notifier: this.notifier | 52 | notifier: this.notifier |
53 | }) | 53 | }) |
54 | ) | 54 | }) |
55 | } | 55 | } |
56 | 56 | ||
57 | onAvatarDelete () { | 57 | onAvatarDelete () { |
58 | this.userService.deleteAvatar() | 58 | this.userService.deleteAvatar() |
59 | .subscribe( | 59 | .subscribe({ |
60 | data => { | 60 | next: data => { |
61 | this.notifier.success($localize`Avatar deleted.`) | 61 | this.notifier.success($localize`Avatar deleted.`) |
62 | 62 | ||
63 | this.user.updateAccountAvatar() | 63 | this.user.updateAccountAvatar() |
64 | }, | 64 | }, |
65 | 65 | ||
66 | (err: HttpErrorResponse) => this.notifier.error(err.message) | 66 | error: (err: HttpErrorResponse) => this.notifier.error(err.message) |
67 | ) | 67 | }) |
68 | } | 68 | } |
69 | } | 69 | } |