From 6b738c7a31591a83fdcd9c78b6b1f98e543c378b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Apr 2018 10:21:38 +0200 Subject: Video channel API routes refractor --- .../account-about/account-about.component.ts | 2 +- client/src/app/+account/account.component.ts | 2 +- client/src/app/shared/account/account.model.ts | 30 +++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'client') 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' styleUrls: [ './account-about.component.scss' ] }) export class AccountAboutComponent implements OnInit { - private account: Account + account: Account constructor ( 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' styleUrls: [ './account.component.scss' ] }) export class AccountComponent implements OnInit { - private account: Account + account: Account constructor ( 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 { updatedAt: Date avatar: Avatar - constructor (hash: ServerAccount) { - this.id = hash.id - this.uuid = hash.uuid - this.url = hash.url - this.name = hash.name - this.displayName = hash.displayName - this.description = hash.description - this.host = hash.host - this.followingCount = hash.followingCount - this.followersCount = hash.followersCount - this.createdAt = new Date(hash.createdAt.toString()) - this.updatedAt = new Date(hash.updatedAt.toString()) - this.avatar = hash.avatar - } - static GET_ACCOUNT_AVATAR_URL (account: Account) { const absoluteAPIUrl = getAbsoluteAPIUrl() @@ -47,4 +32,19 @@ export class Account implements ServerAccount { return accountName + '@' + host } + + constructor (hash: ServerAccount) { + this.id = hash.id + this.uuid = hash.uuid + this.url = hash.url + this.name = hash.name + this.displayName = hash.displayName + this.description = hash.description + this.host = hash.host + this.followingCount = hash.followingCount + this.followersCount = hash.followersCount + this.createdAt = new Date(hash.createdAt.toString()) + this.updatedAt = new Date(hash.updatedAt.toString()) + this.avatar = hash.avatar + } } -- cgit v1.2.3