aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comment.service.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-04 11:19:16 +0100
committerChocobozzz <me@florianbigard.com>2018-01-04 11:19:16 +0100
commit4cb6d4578893db310297d7e118ce2fb7ecb952a3 (patch)
treea89a2e2062ba7bb91e922f07a7950ee51e090ccf /client/src/app/videos/+video-watch/comment/video-comment.service.ts
parentcf117aaafc1e9ae1ab4c388fc5d2e5ba9349efee (diff)
downloadPeerTube-4cb6d4578893db310297d7e118ce2fb7ecb952a3.tar.gz
PeerTube-4cb6d4578893db310297d7e118ce2fb7ecb952a3.tar.zst
PeerTube-4cb6d4578893db310297d7e118ce2fb7ecb952a3.zip
Add ability to delete comments
Diffstat (limited to 'client/src/app/videos/+video-watch/comment/video-comment.service.ts')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.service.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.service.ts b/client/src/app/videos/+video-watch/comment/video-comment.service.ts
index 2fe6cc3e9..c42f55496 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.service.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comment.service.ts
@@ -66,6 +66,15 @@ export class VideoCommentService {
66 .catch((res) => this.restExtractor.handleError(res)) 66 .catch((res) => this.restExtractor.handleError(res))
67 } 67 }
68 68
69 deleteVideoComment (videoId: number | string, commentId: number) {
70 const url = `${VideoCommentService.BASE_VIDEO_URL + videoId}/comments/${commentId}`
71
72 return this.authHttp
73 .delete(url)
74 .map(this.restExtractor.extractDataBool)
75 .catch((res) => this.restExtractor.handleError(res))
76 }
77
69 private extractVideoComment (videoComment: VideoCommentServerModel) { 78 private extractVideoComment (videoComment: VideoCommentServerModel) {
70 return new VideoComment(videoComment) 79 return new VideoComment(videoComment)
71 } 80 }