From b0f9f39ed70299a208d1b388c72de8b7f3510cb7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Sep 2017 20:07:54 +0200 Subject: Begin user quota --- client/src/app/shared/users/user.model.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/users/user.model.ts') diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts index 1c2b481e3..bf12876c7 100644 --- a/client/src/app/shared/users/user.model.ts +++ b/client/src/app/shared/users/user.model.ts @@ -6,6 +6,7 @@ export class User implements UserServerModel { email: string role: UserRole displayNSFW: boolean + videoQuota: number createdAt: Date constructor (hash: { @@ -13,6 +14,7 @@ export class User implements UserServerModel { username: string, email: string, role: UserRole, + videoQuota?: number, displayNSFW?: boolean, createdAt?: Date }) { @@ -20,9 +22,16 @@ export class User implements UserServerModel { this.username = hash.username this.email = hash.email this.role = hash.role - this.displayNSFW = hash.displayNSFW - if (hash.createdAt) { + if (hash.videoQuota !== undefined) { + this.videoQuota = hash.videoQuota + } + + if (hash.displayNSFW !== undefined) { + this.displayNSFW = hash.displayNSFW + } + + if (hash.createdAt !== undefined) { this.createdAt = hash.createdAt } } -- cgit v1.2.3