diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-03-24 01:12:30 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-03-31 10:29:24 +0200 |
commit | 747c562837e37f2fa455e8ef62165e9bb4e365f1 (patch) | |
tree | ae7628afb2865de93b195b064df1dace2e524dbe /client/src/app/shared/video-channel/video-channel.service.ts | |
parent | 8165d00ac6263cf3c0d61d450960ef36635084ff (diff) | |
download | PeerTube-747c562837e37f2fa455e8ef62165e9bb4e365f1.tar.gz PeerTube-747c562837e37f2fa455e8ef62165e9bb4e365f1.tar.zst PeerTube-747c562837e37f2fa455e8ef62165e9bb4e365f1.zip |
Put channel stats behind withStats flag
Diffstat (limited to 'client/src/app/shared/video-channel/video-channel.service.ts')
-rw-r--r-- | client/src/app/shared/video-channel/video-channel.service.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/shared/video-channel/video-channel.service.ts b/client/src/app/shared/video-channel/video-channel.service.ts index adb4f4819..0e036bda7 100644 --- a/client/src/app/shared/video-channel/video-channel.service.ts +++ b/client/src/app/shared/video-channel/video-channel.service.ts | |||
@@ -44,13 +44,18 @@ export class VideoChannelService { | |||
44 | ) | 44 | ) |
45 | } | 45 | } |
46 | 46 | ||
47 | listAccountVideoChannels (account: Account, componentPagination?: ComponentPaginationLight): Observable<ResultList<VideoChannel>> { | 47 | listAccountVideoChannels ( |
48 | account: Account, | ||
49 | componentPagination?: ComponentPaginationLight, | ||
50 | withStats = false | ||
51 | ): Observable<ResultList<VideoChannel>> { | ||
48 | const pagination = componentPagination | 52 | const pagination = componentPagination |
49 | ? this.restService.componentPaginationToRestPagination(componentPagination) | 53 | ? this.restService.componentPaginationToRestPagination(componentPagination) |
50 | : { start: 0, count: 20 } | 54 | : { start: 0, count: 20 } |
51 | 55 | ||
52 | let params = new HttpParams() | 56 | let params = new HttpParams() |
53 | params = this.restService.addRestGetParams(params, pagination) | 57 | params = this.restService.addRestGetParams(params, pagination) |
58 | params = params.set('withStats', withStats + '') | ||
54 | 59 | ||
55 | const url = AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/video-channels' | 60 | const url = AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/video-channels' |
56 | return this.authHttp.get<ResultList<VideoChannelServer>>(url, { params }) | 61 | return this.authHttp.get<ResultList<VideoChannelServer>>(url, { params }) |