diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-25 09:57:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-25 10:41:07 +0200 |
commit | ad9e39fb815d85e5e718c40540fa75471474fa17 (patch) | |
tree | 960accb16bca0fac7694b3f3d5d038534b66c224 /client/src/app/shared/video-channel | |
parent | 06be7ed0b27b371465c5d1b7f92b4adfb0b866ea (diff) | |
download | PeerTube-ad9e39fb815d85e5e718c40540fa75471474fa17.tar.gz PeerTube-ad9e39fb815d85e5e718c40540fa75471474fa17.tar.zst PeerTube-ad9e39fb815d85e5e718c40540fa75471474fa17.zip |
Only use account name in routes
Diffstat (limited to 'client/src/app/shared/video-channel')
-rw-r--r-- | client/src/app/shared/video-channel/video-channel.service.ts | 5 |
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' | |||
8 | import { ResultList } from '../../../../../shared' | 8 | import { ResultList } from '../../../../../shared' |
9 | import { VideoChannel } from './video-channel.model' | 9 | import { VideoChannel } from './video-channel.model' |
10 | import { environment } from '../../../environments/environment' | 10 | import { environment } from '../../../environments/environment' |
11 | import { Account } from '@app/shared/account/account.model' | ||
11 | 12 | ||
12 | @Injectable() | 13 | @Injectable() |
13 | export class VideoChannelService { | 14 | export 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)) |