]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video-blacklist/video-blacklist.service.ts
Changelog typos
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video-blacklist / video-blacklist.service.ts
index a9eab9b6fa8c679e80befd29dc813ce9b8ae8f2a..d65da85fe307c0a95b7cc6a7212bc13209f5bec6 100644 (file)
@@ -34,7 +34,7 @@ export class VideoBlacklistService {
                )
   }
 
-  getAutoBlacklistedAsVideoList (videoPagination: ComponentPagination): Observable<{ videos: Video[], totalVideos: number}> {
+  getAutoBlacklistedAsVideoList (videoPagination: ComponentPagination): Observable<ResultList<Video>> {
     const pagination = this.restService.componentPaginationToRestPagination(videoPagination)
 
     // prioritize first created since waiting longest
@@ -48,9 +48,10 @@ export class VideoBlacklistService {
     return this.authHttp.get<ResultList<VideoBlacklist>>(VideoBlacklistService.BASE_VIDEOS_URL + 'blacklist', { params })
               .pipe(
                 map(res => {
-                  const videos = res.data.map(videoBlacklist => new Video(videoBlacklist.video))
-                  const totalVideos = res.total
-                  return { videos, totalVideos }
+                  return {
+                    total: res.total,
+                    data: res.data.map(videoBlacklist => new Video(videoBlacklist.video))
+                  }
                 }),
                 catchError(res => this.restExtractor.handleError(res))
               )