diff options
Diffstat (limited to 'client/src/app/shared/video/video.service.ts')
-rw-r--r-- | client/src/app/shared/video/video.service.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index 9adf46495..2dd47d74e 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts | |||
@@ -121,14 +121,15 @@ export class VideoService implements VideosProvider { | |||
121 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 121 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
122 | } | 122 | } |
123 | 123 | ||
124 | getMyVideos (videoPagination: ComponentPagination, sort: VideoSortField): Observable<ResultList<Video>> { | 124 | getMyVideos (videoPagination: ComponentPagination, sort: VideoSortField, search?: string): Observable<ResultList<Video>> { |
125 | const pagination = this.restService.componentPaginationToRestPagination(videoPagination) | 125 | const pagination = this.restService.componentPaginationToRestPagination(videoPagination) |
126 | 126 | ||
127 | let params = new HttpParams() | 127 | let params = new HttpParams() |
128 | params = this.restService.addRestGetParams(params, pagination, sort) | 128 | params = this.restService.addRestGetParams(params, pagination, sort) |
129 | params = this.restService.addObjectParams(params, { search }) | ||
129 | 130 | ||
130 | return this.authHttp | 131 | return this.authHttp |
131 | .get<ResultList<Video>>(UserService.BASE_USERS_URL + '/me/videos', { params }) | 132 | .get<ResultList<Video>>(UserService.BASE_USERS_URL + 'me/videos', { params }) |
132 | .pipe( | 133 | .pipe( |
133 | switchMap(res => this.extractVideos(res)), | 134 | switchMap(res => this.extractVideos(res)), |
134 | catchError(err => this.restExtractor.handleError(err)) | 135 | catchError(err => this.restExtractor.handleError(err)) |