From 8094a8980265a0a28e508dbd7cf7c7029e6d98b6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 Sep 2017 21:29:39 +0200 Subject: Add user update for admins --- .../src/app/account/account-details/account-details.component.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'client/src/app/account/account-details/account-details.component.ts') 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 { UserService, USER_PASSWORD } from '../../shared' -import { UserUpdate } from '../../../../../shared' +import { UserUpdateMe } from '../../../../../shared' @Component({ selector: 'my-account-details', @@ -30,7 +30,6 @@ export class AccountDetailsComponent extends FormReactive implements OnInit { constructor ( private authService: AuthService, private formBuilder: FormBuilder, - private router: Router, private notificationsService: NotificationsService, private userService: UserService ) { @@ -51,14 +50,14 @@ export class AccountDetailsComponent extends FormReactive implements OnInit { updateDetails () { const displayNSFW = this.form.value['displayNSFW'] - const details: UserUpdate = { + const details: UserUpdateMe = { displayNSFW } this.error = null - this.userService.updateDetails(details).subscribe( + this.userService.updateMyDetails(details).subscribe( () => { - this.notificationsService.success('Success', 'Informations updated.') + this.notificationsService.success('Success', 'Information updated.') this.authService.refreshUserInformations() }, -- cgit v1.2.3