1 import { User as UserServerModel, UserRole } from '../../../../../shared'
3 export class User implements UserServerModel {
18 displayNSFW?: boolean,
22 this.username = hash.username
23 this.email = hash.email
26 if (hash.videoQuota !== undefined) {
27 this.videoQuota = hash.videoQuota
30 if (hash.displayNSFW !== undefined) {
31 this.displayNSFW = hash.displayNSFW
34 if (hash.createdAt !== undefined) {
35 this.createdAt = hash.createdAt
40 return this.role === 'admin'