aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-24 15:30:28 +0200
committerChocobozzz <me@florianbigard.com>2018-05-24 15:30:28 +0200
commitd14a9532a1363b464d6d15fce86afc4983a8357e (patch)
tree21f7c65eaa6bf5527637f093f79a4a61b46f40b7 /client/src
parentb528582df28f20ec7481d3c73d16b4291fe9c7e7 (diff)
downloadPeerTube-d14a9532a1363b464d6d15fce86afc4983a8357e.tar.gz
PeerTube-d14a9532a1363b464d6d15fce86afc4983a8357e.tar.zst
PeerTube-d14a9532a1363b464d6d15fce86afc4983a8357e.zip
Handle account name in client url
More consistent with AP urls
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+accounts/accounts.component.ts2
-rw-r--r--client/src/app/shared/account/account.service.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts
index 1298803c3..0a52985da 100644
--- a/client/src/app/+accounts/accounts.component.ts
+++ b/client/src/app/+accounts/accounts.component.ts
@@ -16,7 +16,7 @@ export class AccountsComponent implements OnInit {
16 ) {} 16 ) {}
17 17
18 ngOnInit () { 18 ngOnInit () {
19 const accountId = parseInt(this.route.snapshot.params['accountId'], 10) 19 const accountId = this.route.snapshot.params['accountId']
20 20
21 this.accountService.getAccount(accountId) 21 this.accountService.getAccount(accountId)
22 .subscribe(account => this.account = account) 22 .subscribe(account => this.account = account)
diff --git a/client/src/app/shared/account/account.service.ts b/client/src/app/shared/account/account.service.ts
index 20e52d946..6b261cf53 100644
--- a/client/src/app/shared/account/account.service.ts
+++ b/client/src/app/shared/account/account.service.ts
@@ -18,7 +18,7 @@ export class AccountService {
18 private restExtractor: RestExtractor 18 private restExtractor: RestExtractor
19 ) {} 19 ) {}
20 20
21 getAccount (id: number): Observable<Account> { 21 getAccount (id: number | string): Observable<Account> {
22 return this.authHttp.get<ServerAccount>(AccountService.BASE_ACCOUNT_URL + id) 22 return this.authHttp.get<ServerAccount>(AccountService.BASE_ACCOUNT_URL + id)
23 .pipe( 23 .pipe(
24 map(accountHash => new Account(accountHash)), 24 map(accountHash => new Account(accountHash)),