aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/video-list/overview/overview.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+videos/video-list/overview/overview.service.ts')
-rw-r--r--client/src/app/+videos/video-list/overview/overview.service.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/app/+videos/video-list/overview/overview.service.ts b/client/src/app/+videos/video-list/overview/overview.service.ts
index 12d2aa1cb..4a7d9c7c5 100644
--- a/client/src/app/+videos/video-list/overview/overview.service.ts
+++ b/client/src/app/+videos/video-list/overview/overview.service.ts
@@ -5,6 +5,7 @@ import { Injectable } from '@angular/core'
5import { RestExtractor, ServerService } from '@app/core' 5import { RestExtractor, ServerService } from '@app/core'
6import { immutableAssign } from '@app/helpers' 6import { immutableAssign } from '@app/helpers'
7import { VideoService } from '@app/shared/shared-main' 7import { VideoService } from '@app/shared/shared-main'
8import { objectKeysTyped } from '@shared/core-utils'
8import { peertubeTranslate } from '@shared/core-utils/i18n' 9import { peertubeTranslate } from '@shared/core-utils/i18n'
9import { VideosOverview as VideosOverviewServer } from '@shared/models' 10import { VideosOverview as VideosOverviewServer } from '@shared/models'
10import { environment } from '../../../../environments/environment' 11import { environment } from '../../../../environments/environment'
@@ -42,7 +43,7 @@ export class OverviewService {
42 } 43 }
43 44
44 // Build videos objects 45 // Build videos objects
45 for (const key of Object.keys(serverVideosOverview)) { 46 for (const key of objectKeysTyped(serverVideosOverview)) {
46 for (const object of serverVideosOverview[key]) { 47 for (const object of serverVideosOverview[key]) {
47 observables.push( 48 observables.push(
48 of(object.videos) 49 of(object.videos)
@@ -50,7 +51,9 @@ export class OverviewService {
50 switchMap(videos => this.videosService.extractVideos({ total: 0, data: videos })), 51 switchMap(videos => this.videosService.extractVideos({ total: 0, data: videos })),
51 map(result => result.data), 52 map(result => result.data),
52 tap(videos => { 53 tap(videos => {
53 videosOverviewResult[key].push(immutableAssign(object, { videos })) 54 // FIXME: typings & lint
55 // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
56 videosOverviewResult[key].push(immutableAssign(object, { videos }) as any)
54 }) 57 })
55 ) 58 )
56 ) 59 )