aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r--client/src/app/videos/shared/video.service.ts11
1 files changed, 11 insertions, 0 deletions
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 {
55 .catch((res) => this.restExtractor.handleError(res)); 55 .catch((res) => this.restExtractor.handleError(res));
56 } 56 }
57 57
58 reportVideo(id: string, reason: string) {
59 const body = {
60 reason
61 };
62 const url = VideoService.BASE_VIDEO_URL + id + '/abuse';
63
64 return this.authHttp.post(url, body)
65 .map(this.restExtractor.extractDataBool)
66 .catch((res) => this.restExtractor.handleError(res));
67 }
68
58 private extractVideos(result: ResultList) { 69 private extractVideos(result: ResultList) {
59 const videosJson = result.data; 70 const videosJson = result.data;
60 const totalVideos = result.total; 71 const totalVideos = result.total;