diff options
Diffstat (limited to 'client/src/app/shared/shared-moderation/user-ban-modal.component.ts')
-rw-r--r-- | client/src/app/shared/shared-moderation/user-ban-modal.component.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts index b2ce019c5..17cad18ec 100644 --- a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts +++ b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts | |||
@@ -1,10 +1,11 @@ | |||
1 | import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { Notifier, UserService } from '@app/core' | 2 | import { Notifier } from '@app/core' |
3 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 3 | import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
6 | import { User } from '@shared/models' | 6 | import { User } from '@shared/models' |
7 | import { USER_BAN_REASON_VALIDATOR } from '../form-validators/user-validators' | 7 | import { USER_BAN_REASON_VALIDATOR } from '../form-validators/user-validators' |
8 | import { UserAdminService } from '../shared-users' | ||
8 | 9 | ||
9 | @Component({ | 10 | @Component({ |
10 | selector: 'my-user-ban-modal', | 11 | selector: 'my-user-ban-modal', |
@@ -23,7 +24,7 @@ export class UserBanModalComponent extends FormReactive implements OnInit { | |||
23 | protected formValidatorService: FormValidatorService, | 24 | protected formValidatorService: FormValidatorService, |
24 | private modalService: NgbModal, | 25 | private modalService: NgbModal, |
25 | private notifier: Notifier, | 26 | private notifier: Notifier, |
26 | private userService: UserService | 27 | private userAdminService: UserAdminService |
27 | ) { | 28 | ) { |
28 | super() | 29 | super() |
29 | } | 30 | } |
@@ -50,7 +51,7 @@ export class UserBanModalComponent extends FormReactive implements OnInit { | |||
50 | banUser () { | 51 | banUser () { |
51 | const reason = this.form.value['reason'] || undefined | 52 | const reason = this.form.value['reason'] || undefined |
52 | 53 | ||
53 | this.userService.banUsers(this.usersToBan, reason) | 54 | this.userAdminService.banUsers(this.usersToBan, reason) |
54 | .subscribe({ | 55 | .subscribe({ |
55 | next: () => { | 56 | next: () => { |
56 | const message = Array.isArray(this.usersToBan) | 57 | const message = Array.isArray(this.usersToBan) |