X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-moderation%2Fbatch-domains-modal.component.ts;h=20be728f6c9bcabfb8a258aff4736abf143b1c8b;hb=1d54b2052c2144a9c3811fab6d641ee8ddeb1085;hp=6edbb602328380ec11dbab454554818b233d3659;hpb=7ed1edbbe4ffbef28093e4f5630751cb652814e4;p=github%2FChocobozzz%2FPeerTube.git 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 6edbb6023..20be728f6 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 @@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angu import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' -import { DOMAINS_VALIDATOR, getNotEmptyHosts } from '../form-validators/batch-domains-validators' +import { splitAndGetNotEmpty, UNIQUE_HOSTS_VALIDATOR } from '../form-validators/host-validators' @Component({ selector: 'my-batch-domains-modal', @@ -28,7 +28,7 @@ export class BatchDomainsModalComponent extends FormReactive implements OnInit { if (!this.action) this.action = $localize`Process domains` this.buildForm({ - domains: DOMAINS_VALIDATOR + hosts: UNIQUE_HOSTS_VALIDATOR }) } @@ -41,9 +41,7 @@ export class BatchDomainsModalComponent extends FormReactive implements OnInit { } submit () { - this.domains.emit( - getNotEmptyHosts(this.form.controls['domains'].value) - ) + this.domains.emit(splitAndGetNotEmpty(this.form.controls['hosts'].value)) this.form.reset() this.hide() }