diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-17 11:47:04 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-17 15:12:55 +0200 |
commit | 7ed1edbbe4ffbef28093e4f5630751cb652814e4 (patch) | |
tree | 831862165dbfce593447a517c2294a7a4c28d840 /client/src/app/+admin/users/user-edit/user-update.component.ts | |
parent | 1a95f0b9627f8016767a5a386620cbc3335d5f93 (diff) | |
download | PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.gz PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.zst PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.zip |
We don't need services anymore for validators
Diffstat (limited to 'client/src/app/+admin/users/user-edit/user-update.component.ts')
-rw-r--r-- | client/src/app/+admin/users/user-edit/user-update.component.ts | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-update.component.ts b/client/src/app/+admin/users/user-edit/user-update.component.ts index 55bc7290e..e16f66a2b 100644 --- a/client/src/app/+admin/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/users/user-edit/user-update.component.ts | |||
@@ -3,7 +3,13 @@ import { Component, OnDestroy, OnInit } from '@angular/core' | |||
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { ConfigService } from '@app/+admin/config/shared/config.service' | 4 | import { ConfigService } from '@app/+admin/config/shared/config.service' |
5 | import { AuthService, Notifier, ScreenService, ServerService, User, UserService } from '@app/core' | 5 | import { AuthService, Notifier, ScreenService, ServerService, User, UserService } from '@app/core' |
6 | import { FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms' | 6 | import { |
7 | USER_EMAIL_VALIDATOR, | ||
8 | USER_ROLE_VALIDATOR, | ||
9 | USER_VIDEO_QUOTA_DAILY_VALIDATOR, | ||
10 | USER_VIDEO_QUOTA_VALIDATOR | ||
11 | } from '@app/shared/form-validators/user-validators' | ||
12 | import { FormValidatorService } from '@app/shared/shared-forms' | ||
7 | import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@shared/models' | 13 | import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@shared/models' |
8 | import { UserEdit } from './user-edit' | 14 | import { UserEdit } from './user-edit' |
9 | 15 | ||
@@ -23,7 +29,6 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
23 | protected configService: ConfigService, | 29 | protected configService: ConfigService, |
24 | protected screenService: ScreenService, | 30 | protected screenService: ScreenService, |
25 | protected auth: AuthService, | 31 | protected auth: AuthService, |
26 | private userValidatorsService: UserValidatorsService, | ||
27 | private route: ActivatedRoute, | 32 | private route: ActivatedRoute, |
28 | private router: Router, | 33 | private router: Router, |
29 | private notifier: Notifier, | 34 | private notifier: Notifier, |
@@ -44,10 +49,10 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
44 | } | 49 | } |
45 | 50 | ||
46 | this.buildForm({ | 51 | this.buildForm({ |
47 | email: this.userValidatorsService.USER_EMAIL, | 52 | email: USER_EMAIL_VALIDATOR, |
48 | role: this.userValidatorsService.USER_ROLE, | 53 | role: USER_ROLE_VALIDATOR, |
49 | videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, | 54 | videoQuota: USER_VIDEO_QUOTA_VALIDATOR, |
50 | videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY, | 55 | videoQuotaDaily: USER_VIDEO_QUOTA_DAILY_VALIDATOR, |
51 | byPassAutoBlock: null | 56 | byPassAutoBlock: null |
52 | }, defaultValues) | 57 | }, defaultValues) |
53 | 58 | ||