aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-17 11:47:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-08-17 15:12:55 +0200
commit7ed1edbbe4ffbef28093e4f5630751cb652814e4 (patch)
tree831862165dbfce593447a517c2294a7a4c28d840 /client/src/app/shared/shared-moderation/batch-domains-modal.component.ts
parent1a95f0b9627f8016767a5a386620cbc3335d5f93 (diff)
downloadPeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.gz
PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.tar.zst
PeerTube-7ed1edbbe4ffbef28093e4f5630751cb652814e4.zip
We don't need services anymore for validators
Diffstat (limited to 'client/src/app/shared/shared-moderation/batch-domains-modal.component.ts')
-rw-r--r--client/src/app/shared/shared-moderation/batch-domains-modal.component.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts b/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts
index 7193ccb1b..6edbb6023 100644
--- a/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts
+++ b/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts
@@ -1,7 +1,8 @@
1import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' 1import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'
2import { BatchDomainsValidatorsService, FormReactive, FormValidatorService } from '@app/shared/shared-forms' 2import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
3import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 3import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
4import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 4import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
5import { DOMAINS_VALIDATOR, getNotEmptyHosts } from '../form-validators/batch-domains-validators'
5 6
6@Component({ 7@Component({
7 selector: 'my-batch-domains-modal', 8 selector: 'my-batch-domains-modal',
@@ -18,8 +19,7 @@ export class BatchDomainsModalComponent extends FormReactive implements OnInit {
18 19
19 constructor ( 20 constructor (
20 protected formValidatorService: FormValidatorService, 21 protected formValidatorService: FormValidatorService,
21 private modalService: NgbModal, 22 private modalService: NgbModal
22 private batchDomainsValidatorsService: BatchDomainsValidatorsService
23 ) { 23 ) {
24 super() 24 super()
25 } 25 }
@@ -28,7 +28,7 @@ export class BatchDomainsModalComponent extends FormReactive implements OnInit {
28 if (!this.action) this.action = $localize`Process domains` 28 if (!this.action) this.action = $localize`Process domains`
29 29
30 this.buildForm({ 30 this.buildForm({
31 domains: this.batchDomainsValidatorsService.DOMAINS 31 domains: DOMAINS_VALIDATOR
32 }) 32 })
33 } 33 }
34 34
@@ -42,7 +42,7 @@ export class BatchDomainsModalComponent extends FormReactive implements OnInit {
42 42
43 submit () { 43 submit () {
44 this.domains.emit( 44 this.domains.emit(
45 this.batchDomainsValidatorsService.getNotEmptyHosts(this.form.controls['domains'].value) 45 getNotEmptyHosts(this.form.controls['domains'].value)
46 ) 46 )
47 this.form.reset() 47 this.form.reset()
48 this.hide() 48 this.hide()