From 844db39ee56ff0dd59a96acfc68f10f9ac53000b Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Sat, 18 Apr 2020 10:00:19 +0200 Subject: Add search for video, reporter and channel name fields --- client/src/app/shared/video-abuse/video-abuse.service.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/video-abuse/video-abuse.service.ts b/client/src/app/shared/video-abuse/video-abuse.service.ts index 61a328575..a39ad31d4 100644 --- a/client/src/app/shared/video-abuse/video-abuse.service.ts +++ b/client/src/app/shared/video-abuse/video-abuse.service.ts @@ -17,12 +17,19 @@ export class VideoAbuseService { private restExtractor: RestExtractor ) {} - getVideoAbuses (pagination: RestPagination, sort: SortMeta): Observable> { + getVideoAbuses (options: { + pagination: RestPagination, + sort: SortMeta, + search?: string + }): Observable> { + const { pagination, sort, search } = options const url = VideoAbuseService.BASE_VIDEO_ABUSE_URL + 'abuse' let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination, sort) + if (search) params = params.append('search', search) + return this.authHttp.get>(url, { params }) .pipe( map(res => this.restExtractor.convertResultListDateToHuman(res)), -- cgit v1.2.3