aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video-channel/video-channel.service.ts
diff options
context:
space:
mode:
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.ts5
1 files changed, 3 insertions, 2 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 e1e3bf697..55e4c2a31 100644
--- a/client/src/app/shared/video-channel/video-channel.service.ts
+++ b/client/src/app/shared/video-channel/video-channel.service.ts
@@ -8,6 +8,7 @@ import { AccountService } from '../account/account.service'
8import { ResultList } from '../../../../../shared' 8import { ResultList } from '../../../../../shared'
9import { VideoChannel } from './video-channel.model' 9import { VideoChannel } from './video-channel.model'
10import { environment } from '../../../environments/environment' 10import { environment } from '../../../environments/environment'
11import { Account } from '@app/shared/account/account.model'
11 12
12@Injectable() 13@Injectable()
13export class VideoChannelService { 14export class VideoChannelService {
@@ -29,8 +30,8 @@ export class VideoChannelService {
29 ) 30 )
30 } 31 }
31 32
32 listAccountVideoChannels (accountId: number): Observable<ResultList<VideoChannel>> { 33 listAccountVideoChannels (account: Account): Observable<ResultList<VideoChannel>> {
33 return this.authHttp.get<ResultList<VideoChannelServer>>(AccountService.BASE_ACCOUNT_URL + accountId + '/video-channels') 34 return this.authHttp.get<ResultList<VideoChannelServer>>(AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/video-channels')
34 .pipe( 35 .pipe(
35 map(res => this.extractVideoChannels(res)), 36 map(res => this.extractVideoChannels(res)),
36 catchError((res) => this.restExtractor.handleError(res)) 37 catchError((res) => this.restExtractor.handleError(res))