aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-20 19:22:15 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-20 19:22:15 +0100
commit4f8c0eb0e9356ee2782ea6eb12a92e4dc5f66127 (patch)
treebcef1232a565ceaf3d43415a0b08e53e30c236d7 /client/src/app/videos/shared
parent872a4c7cea861246cf84fa3686bd9d40c684535f (diff)
downloadPeerTube-4f8c0eb0e9356ee2782ea6eb12a92e4dc5f66127.tar.gz
PeerTube-4f8c0eb0e9356ee2782ea6eb12a92e4dc5f66127.tar.zst
PeerTube-4f8c0eb0e9356ee2782ea6eb12a92e4dc5f66127.zip
Client: add ability to report a video
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;