]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/users/user-history.service.ts
Add video filters to common video pages
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / users / user-history.service.ts
index 43970dc5bd4764f13618142fd8e1c9428de91130..91268af8c7b7c0e803fe57d6f6736488aa22664a 100644 (file)
@@ -18,12 +18,14 @@ export class UserHistoryService {
     private videoService: VideoService
   ) {}
 
-  getUserVideosHistory (historyPagination: ComponentPaginationLight) {
+  getUserVideosHistory (historyPagination: ComponentPaginationLight, search?: string) {
     const pagination = this.restService.componentPaginationToRestPagination(historyPagination)
 
     let params = new HttpParams()
     params = this.restService.addRestGetParams(params, pagination)
 
+    if (search) params = params.append('search', search)
+
     return this.authHttp
                .get<ResultList<Video>>(UserHistoryService.BASE_USER_VIDEOS_HISTORY_URL, { params })
                .pipe(