]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/users/user.model.ts
Allow users/visitors to search through an account's videos (#3589)
[github/Chocobozzz/PeerTube.git] / client / src / app / core / users / user.model.ts
index f0d3a08b84329572972701ee6cf57922789eaf45..15a4f7f827fa1b2f455b26750d3a691794fb2a69 100644 (file)
@@ -10,11 +10,8 @@ import {
   UserRole,
   VideoChannel
 } from '@shared/models'
-import { UserKeys } from '@root-helpers/user-keys'
 
 export class User implements UserServerModel {
-  static KEYS = UserKeys
-
   id: number
   username: string
   email: string
@@ -134,8 +131,9 @@ export class User implements UserServerModel {
     }
   }
 
-  updateAccountAvatar (newAccountAvatar: Avatar) {
-    this.account.updateAvatar(newAccountAvatar)
+  updateAccountAvatar (newAccountAvatar?: Avatar) {
+    if (newAccountAvatar) this.account.updateAvatar(newAccountAvatar)
+    else this.account.resetAvatar()
   }
 
   isUploadDisabled () {