aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comment.service.ts
diff options
context:
space:
mode:
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 }