diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-21 11:03:25 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-21 11:03:25 +0100 |
commit | d92d070c91ee73657f2e3a5756954ef63fdba306 (patch) | |
tree | 7948b03e025b8878d64c45b5a969871667dab5f1 /client/src/app/+admin/overview/users/user-edit/user-update.component.ts | |
parent | cce70ae5ca3a2bfd893a7a8c457086151470de70 (diff) | |
download | PeerTube-d92d070c91ee73657f2e3a5756954ef63fdba306.tar.gz PeerTube-d92d070c91ee73657f2e3a5756954ef63fdba306.tar.zst PeerTube-d92d070c91ee73657f2e3a5756954ef63fdba306.zip |
Split user service
Diffstat (limited to 'client/src/app/+admin/overview/users/user-edit/user-update.component.ts')
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-update.component.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts index 42599a17e..bab288a67 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts | |||
@@ -10,6 +10,7 @@ import { | |||
10 | USER_VIDEO_QUOTA_VALIDATOR | 10 | USER_VIDEO_QUOTA_VALIDATOR |
11 | } from '@app/shared/form-validators/user-validators' | 11 | } from '@app/shared/form-validators/user-validators' |
12 | import { FormValidatorService } from '@app/shared/shared-forms' | 12 | import { FormValidatorService } from '@app/shared/shared-forms' |
13 | import { UserAdminService } from '@app/shared/shared-users' | ||
13 | import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@shared/models' | 14 | import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@shared/models' |
14 | import { UserEdit } from './user-edit' | 15 | import { UserEdit } from './user-edit' |
15 | 16 | ||
@@ -32,7 +33,8 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
32 | private route: ActivatedRoute, | 33 | private route: ActivatedRoute, |
33 | private router: Router, | 34 | private router: Router, |
34 | private notifier: Notifier, | 35 | private notifier: Notifier, |
35 | private userService: UserService | 36 | private userService: UserService, |
37 | private userAdminService: UserAdminService | ||
36 | ) { | 38 | ) { |
37 | super() | 39 | super() |
38 | 40 | ||
@@ -86,7 +88,7 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
86 | 88 | ||
87 | if (userUpdate.pluginAuth === 'null') userUpdate.pluginAuth = null | 89 | if (userUpdate.pluginAuth === 'null') userUpdate.pluginAuth = null |
88 | 90 | ||
89 | this.userService.updateUser(this.user.id, userUpdate) | 91 | this.userAdminService.updateUser(this.user.id, userUpdate) |
90 | .subscribe({ | 92 | .subscribe({ |
91 | next: () => { | 93 | next: () => { |
92 | this.notifier.success($localize`User ${this.user.username} updated.`) | 94 | this.notifier.success($localize`User ${this.user.username} updated.`) |