]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/account/account.model.ts
Fix typings
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / account / account.model.ts
index 9d1fd3e1d7edab0a8fbbe03f99c0f1a06ba0a919..6a3c6451c420fe0bee8690a4e04149b177987d5d 100644 (file)
@@ -1,21 +1,14 @@
-import { Account as ServerAccount } from '../../../../../shared/models/accounts/account.model'
-import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
-import { environment } from '../../../environments/environment'
+import { Account as ServerAccount } from '../../../../../shared/models/actors/account.model'
+import { Actor } from '../actor/actor.model'
 
-export class Account implements ServerAccount {
-  id: number
-  uuid: string
-  name: string
-  host: string
-  followingCount: number
-  followersCount: number
-  createdAt: Date
-  updatedAt: Date
-  avatar: Avatar
+export class Account extends Actor implements ServerAccount {
+  displayName: string
+  description: string
 
-  static GET_ACCOUNT_AVATAR_PATH (account: Account) {
-    if (account && account.avatar) return account.avatar.path
+  constructor (hash: ServerAccount) {
+    super(hash)
 
-    return environment.apiUrl + '/client/assets/images/default-avatar.png'
+    this.displayName = hash.displayName
+    this.description = hash.description
   }
 }