diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-09-05 21:29:39 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-09-05 21:29:39 +0200 |
commit | 8094a8980265a0a28e508dbd7cf7c7029e6d98b6 (patch) | |
tree | 26be2b9b43dfe485ea14eb53d3a1adb6247c35f8 /client/src/app/account | |
parent | 980246ea8f1c51a137eaf0c441ef7e3b6fb88810 (diff) | |
download | PeerTube-8094a8980265a0a28e508dbd7cf7c7029e6d98b6.tar.gz PeerTube-8094a8980265a0a28e508dbd7cf7c7029e6d98b6.tar.zst PeerTube-8094a8980265a0a28e508dbd7cf7c7029e6d98b6.zip |
Add user update for admins
Diffstat (limited to 'client/src/app/account')
-rw-r--r-- | client/src/app/account/account-change-password/account-change-password.component.ts | 1 | ||||
-rw-r--r-- | client/src/app/account/account-details/account-details.component.ts | 9 |
2 files changed, 4 insertions, 6 deletions
diff --git a/client/src/app/account/account-change-password/account-change-password.component.ts b/client/src/app/account/account-change-password/account-change-password.component.ts index ce786cfa3..dba141296 100644 --- a/client/src/app/account/account-change-password/account-change-password.component.ts +++ b/client/src/app/account/account-change-password/account-change-password.component.ts | |||
@@ -26,7 +26,6 @@ export class AccountChangePasswordComponent extends FormReactive implements OnIn | |||
26 | 26 | ||
27 | constructor ( | 27 | constructor ( |
28 | private formBuilder: FormBuilder, | 28 | private formBuilder: FormBuilder, |
29 | private router: Router, | ||
30 | private notificationsService: NotificationsService, | 29 | private notificationsService: NotificationsService, |
31 | private userService: UserService | 30 | private userService: UserService |
32 | ) { | 31 | ) { |
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 | }, |