aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/users
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r--client/src/app/shared/users/user.model.ts13
1 files changed, 11 insertions, 2 deletions
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 {
6 email: string 6 email: string
7 role: UserRole 7 role: UserRole
8 displayNSFW: boolean 8 displayNSFW: boolean
9 videoQuota: number
9 createdAt: Date 10 createdAt: Date
10 11
11 constructor (hash: { 12 constructor (hash: {
@@ -13,6 +14,7 @@ export class User implements UserServerModel {
13 username: string, 14 username: string,
14 email: string, 15 email: string,
15 role: UserRole, 16 role: UserRole,
17 videoQuota?: number,
16 displayNSFW?: boolean, 18 displayNSFW?: boolean,
17 createdAt?: Date 19 createdAt?: Date
18 }) { 20 }) {
@@ -20,9 +22,16 @@ export class User implements UserServerModel {
20 this.username = hash.username 22 this.username = hash.username
21 this.email = hash.email 23 this.email = hash.email
22 this.role = hash.role 24 this.role = hash.role
23 this.displayNSFW = hash.displayNSFW
24 25
25 if (hash.createdAt) { 26 if (hash.videoQuota !== undefined) {
27 this.videoQuota = hash.videoQuota
28 }
29
30 if (hash.displayNSFW !== undefined) {
31 this.displayNSFW = hash.displayNSFW
32 }
33
34 if (hash.createdAt !== undefined) {
26 this.createdAt = hash.createdAt 35 this.createdAt = hash.createdAt
27 } 36 }
28 } 37 }