import { Account } from '@app/shared/shared-main/account/account.model'
+import { hasUserRight } from '@shared/core-utils/users'
import {
Avatar,
- hasUserRight,
NSFWPolicyType,
User as UserServerModel,
UserAdminFlag,
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
}
}
- updateAccountAvatar (newAccountAvatar: Avatar) {
- this.account.updateAvatar(newAccountAvatar)
+ updateAccountAvatar (newAccountAvatar?: Avatar) {
+ if (newAccountAvatar) this.account.updateAvatar(newAccountAvatar)
+ else this.account.resetAvatar()
}
isUploadDisabled () {