diff options
Diffstat (limited to 'client/src/app/account/account-details/account-details.component.ts')
-rw-r--r-- | client/src/app/account/account-details/account-details.component.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/app/account/account-details/account-details.component.ts b/client/src/app/account/account-details/account-details.component.ts index 547f045c4..8cbed5009 100644 --- a/client/src/app/account/account-details/account-details.component.ts +++ b/client/src/app/account/account-details/account-details.component.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | UserService, | 11 | UserService, |
12 | USER_PASSWORD | 12 | USER_PASSWORD |
13 | } from '../../shared' | 13 | } from '../../shared' |
14 | import { UserUpdate } from '../../../../../shared' | 14 | import { UserUpdateMe } from '../../../../../shared' |
15 | 15 | ||
16 | @Component({ | 16 | @Component({ |
17 | selector: 'my-account-details', | 17 | selector: 'my-account-details', |
@@ -30,7 +30,6 @@ export class AccountDetailsComponent extends FormReactive implements OnInit { | |||
30 | constructor ( | 30 | constructor ( |
31 | private authService: AuthService, | 31 | private authService: AuthService, |
32 | private formBuilder: FormBuilder, | 32 | private formBuilder: FormBuilder, |
33 | private router: Router, | ||
34 | private notificationsService: NotificationsService, | 33 | private notificationsService: NotificationsService, |
35 | private userService: UserService | 34 | private userService: UserService |
36 | ) { | 35 | ) { |
@@ -51,14 +50,14 @@ export class AccountDetailsComponent extends FormReactive implements OnInit { | |||
51 | 50 | ||
52 | updateDetails () { | 51 | updateDetails () { |
53 | const displayNSFW = this.form.value['displayNSFW'] | 52 | const displayNSFW = this.form.value['displayNSFW'] |
54 | const details: UserUpdate = { | 53 | const details: UserUpdateMe = { |
55 | displayNSFW | 54 | displayNSFW |
56 | } | 55 | } |
57 | 56 | ||
58 | this.error = null | 57 | this.error = null |
59 | this.userService.updateDetails(details).subscribe( | 58 | this.userService.updateMyDetails(details).subscribe( |
60 | () => { | 59 | () => { |
61 | this.notificationsService.success('Success', 'Informations updated.') | 60 | this.notificationsService.success('Success', 'Information updated.') |
62 | 61 | ||
63 | this.authService.refreshUserInformations() | 62 | this.authService.refreshUserInformations() |
64 | }, | 63 | }, |