From a3b472a12ec6e57dbe2f650419f8064864686eab Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Aug 2022 11:51:13 +0200 Subject: Add ability to list imports of a channel sync --- .../app/shared/shared-main/video/video-import.service.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/shared-main/video') diff --git a/client/src/app/shared/shared-main/video/video-import.service.ts b/client/src/app/shared/shared-main/video/video-import.service.ts index 0a610ab1f..f9720033a 100644 --- a/client/src/app/shared/shared-main/video/video-import.service.ts +++ b/client/src/app/shared/shared-main/video/video-import.service.ts @@ -43,10 +43,23 @@ export class VideoImportService { .pipe(catchError(res => this.restExtractor.handleError(res))) } - getMyVideoImports (pagination: RestPagination, sort: SortMeta): Observable> { + getMyVideoImports (pagination: RestPagination, sort: SortMeta, search?: string): Observable> { let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination, sort) + if (search) { + const filters = this.restService.parseQueryStringFilter(search, { + videoChannelSyncId: { + prefix: 'videoChannelSyncId:' + }, + targetUrl: { + prefix: 'targetUrl:' + } + }) + + params = this.restService.addObjectParams(params, filters) + } + return this.authHttp .get>(UserService.BASE_USERS_URL + '/me/videos/imports', { params }) .pipe( -- cgit v1.2.3