aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/users
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-04 20:07:54 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-04 20:07:54 +0200
commitb0f9f39ed70299a208d1b388c72de8b7f3510cb7 (patch)
tree4b7d388125265533ac2f6d4bf457d018617e1db6 /client/src/app/shared/users
parente7dbeae8d915cdf4470ceb51c2724b04148b30b5 (diff)
downloadPeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.tar.gz
PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.tar.zst
PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.zip
Begin user quota
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 }