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-password.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-password.component.ts')
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-password.component.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/+admin/overview/users/user-edit/user-password.component.ts b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts index 42bf20de1..8999d1f00 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-password.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts | |||
@@ -1,7 +1,8 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | 1 | import { Component, Input, OnInit } from '@angular/core' |
2 | import { Notifier, UserService } from '@app/core' | 2 | import { Notifier } from '@app/core' |
3 | import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators' | 3 | import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators' |
4 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 4 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
5 | import { UserAdminService } from '@app/shared/shared-users' | ||
5 | import { UserUpdate } from '@shared/models' | 6 | import { UserUpdate } from '@shared/models' |
6 | 7 | ||
7 | @Component({ | 8 | @Component({ |
@@ -19,7 +20,7 @@ export class UserPasswordComponent extends FormReactive implements OnInit { | |||
19 | constructor ( | 20 | constructor ( |
20 | protected formValidatorService: FormValidatorService, | 21 | protected formValidatorService: FormValidatorService, |
21 | private notifier: Notifier, | 22 | private notifier: Notifier, |
22 | private userService: UserService | 23 | private userAdminService: UserAdminService |
23 | ) { | 24 | ) { |
24 | super() | 25 | super() |
25 | } | 26 | } |
@@ -35,7 +36,7 @@ export class UserPasswordComponent extends FormReactive implements OnInit { | |||
35 | 36 | ||
36 | const userUpdate: UserUpdate = this.form.value | 37 | const userUpdate: UserUpdate = this.form.value |
37 | 38 | ||
38 | this.userService.updateUser(this.userId, userUpdate) | 39 | this.userAdminService.updateUser(this.userId, userUpdate) |
39 | .subscribe({ | 40 | .subscribe({ |
40 | next: () => this.notifier.success($localize`Password changed for user ${this.username}.`), | 41 | next: () => this.notifier.success($localize`Password changed for user ${this.username}.`), |
41 | 42 | ||