1
0
Fork 0

Fix user channels list with increased max counter

This commit is contained in:
Chocobozzz 2022-10-10 15:04:27 +02:00
parent 52d6c2e0bf
commit 213bb3bb58
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,7 @@ import { Observable, ReplaySubject } from 'rxjs'
import { catchError, map, tap } from 'rxjs/operators'
import { HttpClient, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core'
import { ComponentPaginationLight, RestExtractor, RestService, ServerService } from '@app/core'
import {
ActorImage,
ResultList,
@ -25,7 +25,8 @@ export class VideoChannelService {
constructor (
private authHttp: HttpClient,
private restService: RestService,
private restExtractor: RestExtractor
private restExtractor: RestExtractor,
private serverService: ServerService
) { }
static extractVideoChannels (result: ResultList<VideoChannelServer>) {
@ -56,9 +57,11 @@ export class VideoChannelService {
}): Observable<ResultList<VideoChannel>> {
const { account, componentPagination, withStats = false, sort, search } = options
const defaultCount = this.serverService.getHTMLConfig().videoChannels.maxPerUser
const pagination = componentPagination
? this.restService.componentToRestPagination(componentPagination)
: { start: 0, count: 20 }
: { start: 0, count: defaultCount }
let params = new HttpParams()
params = this.restService.addRestGetParams(params, pagination, sort)