diff options
Diffstat (limited to 'client/src/app/+admin/overview/users/user-edit/user-create.component.ts')
-rw-r--r-- | client/src/app/+admin/overview/users/user-edit/user-create.component.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/+admin/overview/users/user-edit/user-create.component.ts b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts index b61b22fd0..1713e06ce 100644 --- a/client/src/app/+admin/overview/users/user-edit/user-create.component.ts +++ b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Router } from '@angular/router' | 2 | import { Router } from '@angular/router' |
3 | import { ConfigService } from '@app/+admin/config/shared/config.service' | 3 | import { ConfigService } from '@app/+admin/config/shared/config.service' |
4 | import { AuthService, Notifier, ScreenService, ServerService, UserService } from '@app/core' | 4 | import { AuthService, Notifier, ScreenService, ServerService } from '@app/core' |
5 | import { | 5 | import { |
6 | USER_CHANNEL_NAME_VALIDATOR, | 6 | USER_CHANNEL_NAME_VALIDATOR, |
7 | USER_EMAIL_VALIDATOR, | 7 | USER_EMAIL_VALIDATOR, |
@@ -13,6 +13,7 @@ import { | |||
13 | USER_VIDEO_QUOTA_VALIDATOR | 13 | USER_VIDEO_QUOTA_VALIDATOR |
14 | } from '@app/shared/form-validators/user-validators' | 14 | } from '@app/shared/form-validators/user-validators' |
15 | import { FormValidatorService } from '@app/shared/shared-forms' | 15 | import { FormValidatorService } from '@app/shared/shared-forms' |
16 | import { UserAdminService } from '@app/shared/shared-users' | ||
16 | import { UserCreate, UserRole } from '@shared/models' | 17 | import { UserCreate, UserRole } from '@shared/models' |
17 | import { UserEdit } from './user-edit' | 18 | import { UserEdit } from './user-edit' |
18 | 19 | ||
@@ -32,7 +33,7 @@ export class UserCreateComponent extends UserEdit implements OnInit { | |||
32 | protected auth: AuthService, | 33 | protected auth: AuthService, |
33 | private router: Router, | 34 | private router: Router, |
34 | private notifier: Notifier, | 35 | private notifier: Notifier, |
35 | private userService: UserService | 36 | private userAdminService: UserAdminService |
36 | ) { | 37 | ) { |
37 | super() | 38 | super() |
38 | 39 | ||
@@ -71,7 +72,7 @@ export class UserCreateComponent extends UserEdit implements OnInit { | |||
71 | userCreate.videoQuota = parseInt(this.form.value['videoQuota'], 10) | 72 | userCreate.videoQuota = parseInt(this.form.value['videoQuota'], 10) |
72 | userCreate.videoQuotaDaily = parseInt(this.form.value['videoQuotaDaily'], 10) | 73 | userCreate.videoQuotaDaily = parseInt(this.form.value['videoQuotaDaily'], 10) |
73 | 74 | ||
74 | this.userService.addUser(userCreate) | 75 | this.userAdminService.addUser(userCreate) |
75 | .subscribe({ | 76 | .subscribe({ |
76 | next: () => { | 77 | next: () => { |
77 | this.notifier.success($localize`User ${userCreate.username} created.`) | 78 | this.notifier.success($localize`User ${userCreate.username} created.`) |