FeedFormat,
ResultList,
ThreadsResultList,
+ Video,
VideoComment as VideoCommentServerModel,
VideoCommentAdmin,
VideoCommentCreate,
return this.authHttp.post<{ comment: VideoCommentServerModel }>(url, normalizedComment)
.pipe(
- map(data => this.extractVideoComment(data.comment)),
- catchError(err => this.restExtractor.handleError(err))
+ map(data => this.extractVideoComment(data.comment)),
+ catchError(err => this.restExtractor.handleError(err))
)
}
}
getAdminVideoComments (options: {
- pagination: RestPagination,
- sort: SortMeta,
+ pagination: RestPagination
+ sort: SortMeta
search?: string
}): Observable<ResultList<VideoCommentAdmin>> {
const { pagination, sort, search } = options
}
getVideoCommentThreads (parameters: {
- videoId: number | string,
- componentPagination: ComponentPaginationLight,
+ videoId: number | string
+ componentPagination: ComponentPaginationLight
sort: string
}): Observable<ThreadsResultList<VideoComment>> {
const { videoId, componentPagination, sort } = parameters
- const pagination = this.restService.componentPaginationToRestPagination(componentPagination)
+ const pagination = this.restService.componentToRestPagination(componentPagination)
let params = new HttpParams()
params = this.restService.addRestGetParams(params, pagination, sort)
}
getVideoThreadComments (parameters: {
- videoId: number | string,
+ videoId: number | string
threadId: number
}): Observable<VideoCommentThreadTree> {
const { videoId, threadId } = parameters
)
}
- getVideoCommentsFeeds (videoUUID?: string) {
+ getVideoCommentsFeeds (video: Pick<Video, 'uuid'>) {
const feeds = [
{
format: FeedFormat.RSS,
}
]
- if (videoUUID !== undefined) {
+ if (video !== undefined) {
for (const feed of feeds) {
- feed.url += '?videoId=' + videoUUID
+ feed.url += '?videoId=' + video.uuid
}
}
const filters = this.restService.parseQueryStringFilter(search, {
isLocal: {
prefix: 'local:',
- isBoolean: true,
- handler: v => {
- if (v === 'true') return v
- if (v === 'false') return v
-
- return undefined
- }
+ isBoolean: true
},
searchAccount: { prefix: 'account:' },