diff options
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | 8 |
1 files changed, 7 insertions, 1 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 7ea4610d4..d5d019b35 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 | |||
@@ -1,6 +1,8 @@ | |||
1 | import { ViewportScroller } from '@angular/common' | 1 | import { ViewportScroller } from '@angular/common' |
2 | import { HttpErrorResponse } from '@angular/common/http' | ||
2 | import { AfterViewChecked, Component, OnInit } from '@angular/core' | 3 | import { AfterViewChecked, Component, OnInit } from '@angular/core' |
3 | import { AuthService, Notifier, User, UserService } from '@app/core' | 4 | import { AuthService, Notifier, User, UserService } from '@app/core' |
5 | import { uploadErrorHandler } from '@app/helpers' | ||
4 | 6 | ||
5 | @Component({ | 7 | @Component({ |
6 | selector: 'my-account-settings', | 8 | selector: 'my-account-settings', |
@@ -44,7 +46,11 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked { | |||
44 | this.user.updateAccountAvatar(data.avatar) | 46 | this.user.updateAccountAvatar(data.avatar) |
45 | }, | 47 | }, |
46 | 48 | ||
47 | err => this.notifier.error(err.message) | 49 | (err: HttpErrorResponse) => uploadErrorHandler({ |
50 | err, | ||
51 | name: $localize`avatar`, | ||
52 | notifier: this.notifier | ||
53 | }) | ||
48 | ) | 54 | ) |
49 | } | 55 | } |
50 | } | 56 | } |