From bf64ed4196938ba9002c887cadb01bd2a6e3127a Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sat, 28 Dec 2019 01:10:26 +0100 Subject: Add search bars for a user's videos and playlist library --- client/src/app/shared/video/video.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/video/video.service.ts') 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 { .pipe(catchError(err => this.restExtractor.handleError(err))) } - getMyVideos (videoPagination: ComponentPagination, sort: VideoSortField): Observable> { + getMyVideos (videoPagination: ComponentPagination, sort: VideoSortField, search?: string): Observable> { const pagination = this.restService.componentPaginationToRestPagination(videoPagination) let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination, sort) + params = this.restService.addObjectParams(params, { search }) return this.authHttp - .get>(UserService.BASE_USERS_URL + '/me/videos', { params }) + .get>(UserService.BASE_USERS_URL + 'me/videos', { params }) .pipe( switchMap(res => this.extractVideos(res)), catchError(err => this.restExtractor.handleError(err)) -- cgit v1.2.3