X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fshared%2Fvideo.service.ts;h=7094d9a34210e4e7498e426adcec6b240379de1c;hb=5769e1db8d3d5a1e3baa8dff23090cfe93d48a50;hp=9d79b2f5ea278c034be0a7b2a0b4dd07f1199201;hpb=c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/shared/video.service.ts b/client/src/app/videos/shared/video.service.ts index 9d79b2f5e..7094d9a34 100644 --- a/client/src/app/videos/shared/video.service.ts +++ b/client/src/app/videos/shared/video.service.ts @@ -55,6 +55,17 @@ export class VideoService { .catch((res) => this.restExtractor.handleError(res)); } + reportVideo(id: string, reason: string) { + const body = { + reason + }; + const url = VideoService.BASE_VIDEO_URL + id + '/abuse'; + + return this.authHttp.post(url, body) + .map(this.restExtractor.extractDataBool) + .catch((res) => this.restExtractor.handleError(res)); + } + private extractVideos(result: ResultList) { const videosJson = result.data; const totalVideos = result.total;