diff options
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r-- | client/src/app/shared/users/user.model.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts index 4a94b032d..2bdc48a1d 100644 --- a/client/src/app/shared/users/user.model.ts +++ b/client/src/app/shared/users/user.model.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import { hasUserRight, User as UserServerModel, UserRight, UserRole, VideoChannel } from '../../../../../shared' | 1 | import { hasUserRight, User as UserServerModel, UserRight, UserRole, VideoChannel } from '../../../../../shared' |
2 | import { Account } from '../account/account.model' | 2 | import { Account } from '../account/account.model' |
3 | import { NSFWPolicyType } from '../../../../../shared/models/videos/nsfw-policy.type' | ||
3 | 4 | ||
4 | export type UserConstructorHash = { | 5 | export type UserConstructorHash = { |
5 | id: number, | 6 | id: number, |
@@ -7,7 +8,7 @@ export type UserConstructorHash = { | |||
7 | email: string, | 8 | email: string, |
8 | role: UserRole, | 9 | role: UserRole, |
9 | videoQuota?: number, | 10 | videoQuota?: number, |
10 | displayNSFW?: boolean, | 11 | nsfwPolicy?: NSFWPolicyType, |
11 | autoPlayVideo?: boolean, | 12 | autoPlayVideo?: boolean, |
12 | createdAt?: Date, | 13 | createdAt?: Date, |
13 | account?: Account, | 14 | account?: Account, |
@@ -18,7 +19,7 @@ export class User implements UserServerModel { | |||
18 | username: string | 19 | username: string |
19 | email: string | 20 | email: string |
20 | role: UserRole | 21 | role: UserRole |
21 | displayNSFW: boolean | 22 | nsfwPolicy: NSFWPolicyType |
22 | autoPlayVideo: boolean | 23 | autoPlayVideo: boolean |
23 | videoQuota: number | 24 | videoQuota: number |
24 | account: Account | 25 | account: Account |
@@ -40,8 +41,8 @@ export class User implements UserServerModel { | |||
40 | this.videoQuota = hash.videoQuota | 41 | this.videoQuota = hash.videoQuota |
41 | } | 42 | } |
42 | 43 | ||
43 | if (hash.displayNSFW !== undefined) { | 44 | if (hash.nsfwPolicy !== undefined) { |
44 | this.displayNSFW = hash.displayNSFW | 45 | this.nsfwPolicy = hash.nsfwPolicy |
45 | } | 46 | } |
46 | 47 | ||
47 | if (hash.autoPlayVideo !== undefined) { | 48 | if (hash.autoPlayVideo !== undefined) { |