aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-25 10:21:38 +0200
committerChocobozzz <me@florianbigard.com>2018-04-25 13:50:48 +0200
commit6b738c7a31591a83fdcd9c78b6b1f98e543c378b (patch)
treedb771d0e99e9ff27570885fe2a6f58a7c1948fbc /client
parent48dce1c90dff4e90a4bcffefaecf157336cf904b (diff)
downloadPeerTube-6b738c7a31591a83fdcd9c78b6b1f98e543c378b.tar.gz
PeerTube-6b738c7a31591a83fdcd9c78b6b1f98e543c378b.tar.zst
PeerTube-6b738c7a31591a83fdcd9c78b6b1f98e543c378b.zip
Video channel API routes refractor
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+account/account-about/account-about.component.ts2
-rw-r--r--client/src/app/+account/account.component.ts2
-rw-r--r--client/src/app/shared/account/account.model.ts30
3 files changed, 17 insertions, 17 deletions
diff --git a/client/src/app/+account/account-about/account-about.component.ts b/client/src/app/+account/account-about/account-about.component.ts
index 0772b844e..8746875cb 100644
--- a/client/src/app/+account/account-about/account-about.component.ts
+++ b/client/src/app/+account/account-about/account-about.component.ts
@@ -18,7 +18,7 @@ import { AccountService } from '@app/shared/account/account.service'
18 styleUrls: [ './account-about.component.scss' ] 18 styleUrls: [ './account-about.component.scss' ]
19}) 19})
20export class AccountAboutComponent implements OnInit { 20export class AccountAboutComponent implements OnInit {
21 private account: Account 21 account: Account
22 22
23 constructor ( 23 constructor (
24 protected route: ActivatedRoute, 24 protected route: ActivatedRoute,
diff --git a/client/src/app/+account/account.component.ts b/client/src/app/+account/account.component.ts
index 1c3e528a7..ae5354ed9 100644
--- a/client/src/app/+account/account.component.ts
+++ b/client/src/app/+account/account.component.ts
@@ -9,7 +9,7 @@ import { Account } from '@app/shared/account/account.model'
9 styleUrls: [ './account.component.scss' ] 9 styleUrls: [ './account.component.scss' ]
10}) 10})
11export class AccountComponent implements OnInit { 11export class AccountComponent implements OnInit {
12 private account: Account 12 account: Account
13 13
14 constructor ( 14 constructor (
15 private route: ActivatedRoute, 15 private route: ActivatedRoute,
diff --git a/client/src/app/shared/account/account.model.ts b/client/src/app/shared/account/account.model.ts
index 3d5176bdd..10a70ac31 100644
--- a/client/src/app/shared/account/account.model.ts
+++ b/client/src/app/shared/account/account.model.ts
@@ -16,21 +16,6 @@ export class Account implements ServerAccount {
16 updatedAt: Date 16 updatedAt: Date
17 avatar: Avatar 17 avatar: Avatar
18 18
19 constructor (hash: ServerAccount) {
20 this.id = hash.id
21 this.uuid = hash.uuid
22 this.url = hash.url
23 this.name = hash.name
24 this.displayName = hash.displayName
25 this.description = hash.description
26 this.host = hash.host
27 this.followingCount = hash.followingCount
28 this.followersCount = hash.followersCount
29 this.createdAt = new Date(hash.createdAt.toString())
30 this.updatedAt = new Date(hash.updatedAt.toString())
31 this.avatar = hash.avatar
32 }
33
34 static GET_ACCOUNT_AVATAR_URL (account: Account) { 19 static GET_ACCOUNT_AVATAR_URL (account: Account) {
35 const absoluteAPIUrl = getAbsoluteAPIUrl() 20 const absoluteAPIUrl = getAbsoluteAPIUrl()
36 21
@@ -47,4 +32,19 @@ export class Account implements ServerAccount {
47 32
48 return accountName + '@' + host 33 return accountName + '@' + host
49 } 34 }
35
36 constructor (hash: ServerAccount) {
37 this.id = hash.id
38 this.uuid = hash.uuid
39 this.url = hash.url
40 this.name = hash.name
41 this.displayName = hash.displayName
42 this.description = hash.description
43 this.host = hash.host
44 this.followingCount = hash.followingCount
45 this.followersCount = hash.followersCount
46 this.createdAt = new Date(hash.createdAt.toString())
47 this.updatedAt = new Date(hash.updatedAt.toString())
48 this.avatar = hash.avatar
49 }
50} 50}