From d59cba295b7f2ead41e1828c1567e60942476367 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Jul 2018 17:18:46 +0200 Subject: [PATCH] category parma -> categoryOneOf (videos list) --- client/src/app/shared/video/abstract-video-list.ts | 4 ++-- client/src/app/shared/video/video.service.ts | 10 +++++----- .../src/app/videos/video-list/video-local.component.ts | 4 ++-- .../video-list/video-recently-added.component.ts | 4 ++-- .../app/videos/video-list/video-trending.component.ts | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index d60536e20..59d3c1ebe 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts @@ -24,7 +24,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { totalItems: null } sort: VideoSortField = '-publishedAt' - category?: number + categoryOneOf?: number defaultSort: VideoSortField = '-publishedAt' syndicationItems = [] @@ -168,7 +168,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { protected loadRouteParams (routeParams: { [ key: string ]: any }) { this.sort = routeParams['sort'] as VideoSortField || this.defaultSort - this.category = routeParams['category'] + this.categoryOneOf = routeParams['categoryOneOf'] if (routeParams['page'] !== undefined) { this.pagination.currentPage = parseInt(routeParams['page'], 10) } else { diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index f316d31ea..ddf365959 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts @@ -159,7 +159,7 @@ export class VideoService { videoPagination: ComponentPagination, sort: VideoSortField, filter?: VideoFilter, - category?: number + categoryOneOf?: number ): Observable<{ videos: Video[], totalVideos: number }> { const pagination = this.restService.componentPaginationToRestPagination(videoPagination) @@ -170,8 +170,8 @@ export class VideoService { params = params.set('filter', filter) } - if (category) { - params = params.set('category', category + '') + if (categoryOneOf) { + params = params.set('categoryOneOf', categoryOneOf + '') } return this.authHttp @@ -207,12 +207,12 @@ export class VideoService { return feeds } - getVideoFeedUrls (sort: VideoSortField, filter?: VideoFilter, category?: number) { + getVideoFeedUrls (sort: VideoSortField, filter?: VideoFilter, categoryOneOf?: number) { let params = this.restService.addRestGetParams(new HttpParams(), undefined, sort) if (filter) params = params.set('filter', filter) - if (category) params = params.set('category', category + '') + if (categoryOneOf) params = params.set('categoryOneOf', categoryOneOf + '') return this.buildBaseFeedUrls(params) } diff --git a/client/src/app/videos/video-list/video-local.component.ts b/client/src/app/videos/video-list/video-local.component.ts index de460ea60..c91c639ca 100644 --- a/client/src/app/videos/video-list/video-local.component.ts +++ b/client/src/app/videos/video-list/video-local.component.ts @@ -50,10 +50,10 @@ export class VideoLocalComponent extends AbstractVideoList implements OnInit, On getVideosObservable (page: number) { const newPagination = immutableAssign(this.pagination, { currentPage: page }) - return this.videoService.getVideos(newPagination, this.sort, this.filter, this.category) + return this.videoService.getVideos(newPagination, this.sort, this.filter, this.categoryOneOf) } generateSyndicationList () { - this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, this.filter, this.category) + this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, this.filter, this.categoryOneOf) } } diff --git a/client/src/app/videos/video-list/video-recently-added.component.ts b/client/src/app/videos/video-list/video-recently-added.component.ts index 75688731d..ac1fcfff3 100644 --- a/client/src/app/videos/video-list/video-recently-added.component.ts +++ b/client/src/app/videos/video-list/video-recently-added.component.ts @@ -48,10 +48,10 @@ export class VideoRecentlyAddedComponent extends AbstractVideoList implements On getVideosObservable (page: number) { const newPagination = immutableAssign(this.pagination, { currentPage: page }) - return this.videoService.getVideos(newPagination, this.sort, undefined, this.category) + return this.videoService.getVideos(newPagination, this.sort, undefined, this.categoryOneOf) } generateSyndicationList () { - this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.category) + this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.categoryOneOf) } } diff --git a/client/src/app/videos/video-list/video-trending.component.ts b/client/src/app/videos/video-list/video-trending.component.ts index 3738b95b1..68bb70265 100644 --- a/client/src/app/videos/video-list/video-trending.component.ts +++ b/client/src/app/videos/video-list/video-trending.component.ts @@ -47,10 +47,10 @@ export class VideoTrendingComponent extends AbstractVideoList implements OnInit, getVideosObservable (page: number) { const newPagination = immutableAssign(this.pagination, { currentPage: page }) - return this.videoService.getVideos(newPagination, this.sort, undefined, this.category) + return this.videoService.getVideos(newPagination, this.sort, undefined, this.categoryOneOf) } generateSyndicationList () { - this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.category) + this.syndicationItems = this.videoService.getVideoFeedUrls(this.sort, undefined, this.categoryOneOf) } } -- 2.41.0