]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/account/account.model.ts
Update video channel routes
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / account / account.model.ts
index dffca783b159f94500e5055aee1ad948904087ee..3d5176bdd691288957072c8b4aaf25540db19101 100644 (file)
@@ -8,6 +8,7 @@ export class Account implements ServerAccount {
   url: string
   name: string
   displayName: string
+  description: string
   host: string
   followingCount: number
   followersCount: number
@@ -15,6 +16,21 @@ 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()