From 11ac88de40215783835cf6e6259ff0f6cee258dd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 23 Jan 2017 22:16:48 +0100 Subject: Client: add basic support to report video abuses --- client/src/app/videos/video-watch/video-report.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'client/src/app/videos/video-watch') diff --git a/client/src/app/videos/video-watch/video-report.component.ts b/client/src/app/videos/video-watch/video-report.component.ts index 7bc1677ab..7a125f53e 100644 --- a/client/src/app/videos/video-watch/video-report.component.ts +++ b/client/src/app/videos/video-watch/video-report.component.ts @@ -3,7 +3,7 @@ import { FormBuilder, FormGroup } from '@angular/forms'; import { ModalDirective } from 'ng2-bootstrap/modal'; -import { FormReactive, VIDEO_REPORT_REASON } from '../../shared'; +import { FormReactive, VideoAbuseService, VIDEO_ABUSE_REASON } from '../../shared'; import { Video, VideoService } from '../shared'; @Component({ @@ -21,12 +21,12 @@ export class VideoReportComponent extends FormReactive implements OnInit { reason: '' }; validationMessages = { - reason: VIDEO_REPORT_REASON.MESSAGES + reason: VIDEO_ABUSE_REASON.MESSAGES }; constructor( private formBuilder: FormBuilder, - private videoService: VideoService + private videoAbuseService: VideoAbuseService ) { super(); } @@ -37,7 +37,7 @@ export class VideoReportComponent extends FormReactive implements OnInit { buildForm() { this.form = this.formBuilder.group({ - reason: [ '', VIDEO_REPORT_REASON.VALIDATORS ] + reason: [ '', VIDEO_ABUSE_REASON.VALIDATORS ] }); this.form.valueChanges.subscribe(data => this.onValueChanged(data)); @@ -54,7 +54,7 @@ export class VideoReportComponent extends FormReactive implements OnInit { report() { const reason = this.form.value['reason'] - this.videoService.reportVideo(this.video.id, reason) + this.videoAbuseService.reportVideo(this.video.id, reason) .subscribe( // TODO: move alert to beautiful notifications ok => { -- cgit v1.2.3