From ad9e39fb815d85e5e718c40540fa75471474fa17 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 25 May 2018 09:57:16 +0200 Subject: Only use account name in routes --- client/src/app/shared/video-channel/video-channel.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/video-channel') 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' import { ResultList } from '../../../../../shared' import { VideoChannel } from './video-channel.model' import { environment } from '../../../environments/environment' +import { Account } from '@app/shared/account/account.model' @Injectable() export class VideoChannelService { @@ -29,8 +30,8 @@ export class VideoChannelService { ) } - listAccountVideoChannels (accountId: number): Observable> { - return this.authHttp.get>(AccountService.BASE_ACCOUNT_URL + accountId + '/video-channels') + listAccountVideoChannels (account: Account): Observable> { + return this.authHttp.get>(AccountService.BASE_ACCOUNT_URL + account.nameWithHost + '/video-channels') .pipe( map(res => this.extractVideoChannels(res)), catchError((res) => this.restExtractor.handleError(res)) -- cgit v1.2.3