diff options
Diffstat (limited to 'client/src/app/search/search.service.ts')
-rw-r--r-- | client/src/app/search/search.service.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/client/src/app/search/search.service.ts b/client/src/app/search/search.service.ts index cd3bdad35..8f137a321 100644 --- a/client/src/app/search/search.service.ts +++ b/client/src/app/search/search.service.ts | |||
@@ -23,13 +23,14 @@ export class SearchService { | |||
23 | private videoService: VideoService | 23 | private videoService: VideoService |
24 | ) {} | 24 | ) {} |
25 | 25 | ||
26 | searchVideos ( | 26 | searchVideos (parameters: { |
27 | search: string, | 27 | search: string, |
28 | componentPagination: ComponentPagination, | 28 | componentPagination: ComponentPagination, |
29 | advancedSearch: AdvancedSearch | 29 | advancedSearch: AdvancedSearch |
30 | ): Observable<{ videos: Video[], totalVideos: number }> { | 30 | }): Observable<ResultList<Video>> { |
31 | const url = SearchService.BASE_SEARCH_URL + 'videos' | 31 | const { search, componentPagination, advancedSearch } = parameters |
32 | 32 | ||
33 | const url = SearchService.BASE_SEARCH_URL + 'videos' | ||
33 | const pagination = this.restService.componentPaginationToRestPagination(componentPagination) | 34 | const pagination = this.restService.componentPaginationToRestPagination(componentPagination) |
34 | 35 | ||
35 | let params = new HttpParams() | 36 | let params = new HttpParams() |
@@ -48,12 +49,13 @@ export class SearchService { | |||
48 | ) | 49 | ) |
49 | } | 50 | } |
50 | 51 | ||
51 | searchVideoChannels ( | 52 | searchVideoChannels (parameters: { |
52 | search: string, | 53 | search: string, |
53 | componentPagination: ComponentPagination | 54 | componentPagination: ComponentPagination |
54 | ): Observable<{ data: VideoChannel[], total: number }> { | 55 | }): Observable<ResultList<VideoChannel>> { |
55 | const url = SearchService.BASE_SEARCH_URL + 'video-channels' | 56 | const { search, componentPagination } = parameters |
56 | 57 | ||
58 | const url = SearchService.BASE_SEARCH_URL + 'video-channels' | ||
57 | const pagination = this.restService.componentPaginationToRestPagination(componentPagination) | 59 | const pagination = this.restService.componentPaginationToRestPagination(componentPagination) |
58 | 60 | ||
59 | let params = new HttpParams() | 61 | let params = new HttpParams() |