X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-watch%2Fcomment%2Fvideo-comment.service.ts;h=eb608a1a36a9cec2ddfe57d03dee0642af3c23e7;hb=93cae47925e4dd68b7d34a41927b2740b4fab1b4;hp=b8e5878c5b9c8391dedd419b70984e5eb5d222b6;hpb=587568e1cc0e33c023c1ac62dd28fef313285250;p=github%2FChocobozzz%2FPeerTube.git 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 b8e5878c5..eb608a1a3 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 @@ -48,11 +48,13 @@ export class VideoCommentService { ) } - getVideoCommentThreads ( + getVideoCommentThreads (parameters: { videoId: number | string, componentPagination: ComponentPagination, sort: VideoSortField - ): Observable<{ comments: VideoComment[], totalComments: number}> { + }): Observable<{ comments: VideoComment[], totalComments: number}> { + const { videoId, componentPagination, sort } = parameters + const pagination = this.restService.componentPaginationToRestPagination(componentPagination) let params = new HttpParams() @@ -67,7 +69,11 @@ export class VideoCommentService { ) } - getVideoThreadComments (videoId: number | string, threadId: number): Observable { + getVideoThreadComments (parameters: { + videoId: number | string, + threadId: number + }): Observable { + const { videoId, threadId } = parameters const url = `${VideoCommentService.BASE_VIDEO_URL + videoId}/comment-threads/${threadId}` return this.authHttp