diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 11:01:45 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 11:01:45 +0200 |
commit | 46757b477c1adb5f98060d15998a3852e18902a6 (patch) | |
tree | 3dee14c84eaee450eb4f409bb170e08a58a03d59 /client | |
parent | ee9e7b61f59a427208386738057c8eff48fba599 (diff) | |
download | PeerTube-46757b477c1adb5f98060d15998a3852e18902a6.tar.gz PeerTube-46757b477c1adb5f98060d15998a3852e18902a6.tar.zst PeerTube-46757b477c1adb5f98060d15998a3852e18902a6.zip |
Fix client compilation
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/core/auth/auth-user.model.ts | 5 | ||||
-rw-r--r-- | client/src/app/shared/users/user.model.ts | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/client/src/app/core/auth/auth-user.model.ts b/client/src/app/core/auth/auth-user.model.ts index f827bd6ca..1a31a7834 100644 --- a/client/src/app/core/auth/auth-user.model.ts +++ b/client/src/app/core/auth/auth-user.model.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | // Do not use the barrel (dependency loop) | 1 | // Do not use the barrel (dependency loop) |
2 | import { UserRole } from '../../../../../shared/models/user.model' | ||
2 | import { User } from '../../shared/users/user.model'; | 3 | import { User } from '../../shared/users/user.model'; |
3 | 4 | ||
4 | export class AuthUser extends User { | 5 | export class AuthUser extends User { |
@@ -20,7 +21,7 @@ export class AuthUser extends User { | |||
20 | id: parseInt(localStorage.getItem(this.KEYS.ID)), | 21 | id: parseInt(localStorage.getItem(this.KEYS.ID)), |
21 | username: localStorage.getItem(this.KEYS.USERNAME), | 22 | username: localStorage.getItem(this.KEYS.USERNAME), |
22 | email: localStorage.getItem(this.KEYS.EMAIL), | 23 | email: localStorage.getItem(this.KEYS.EMAIL), |
23 | role: localStorage.getItem(this.KEYS.ROLE), | 24 | role: localStorage.getItem(this.KEYS.ROLE) as UserRole, |
24 | displayNSFW: localStorage.getItem(this.KEYS.DISPLAY_NSFW) === 'true' | 25 | displayNSFW: localStorage.getItem(this.KEYS.DISPLAY_NSFW) === 'true' |
25 | }, | 26 | }, |
26 | Tokens.load() | 27 | Tokens.load() |
@@ -41,7 +42,7 @@ export class AuthUser extends User { | |||
41 | constructor(userHash: { | 42 | constructor(userHash: { |
42 | id: number, | 43 | id: number, |
43 | username: string, | 44 | username: string, |
44 | role: string, | 45 | role: UserRole, |
45 | email: string, | 46 | email: string, |
46 | displayNSFW: boolean | 47 | displayNSFW: boolean |
47 | }, hashTokens: any) { | 48 | }, hashTokens: any) { |
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts index 09722704a..d4695ab67 100644 --- a/client/src/app/shared/users/user.model.ts +++ b/client/src/app/shared/users/user.model.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { User as UserServerModel } from '../../../../../shared'; | 1 | import { User as UserServerModel, UserRole } from '../../../../../shared'; |
2 | 2 | ||
3 | export class User implements UserServerModel { | 3 | export class User implements UserServerModel { |
4 | id: number; | 4 | id: number; |
5 | username: string; | 5 | username: string; |
6 | email: string; | 6 | email: string; |
7 | role: string; | 7 | role: UserRole; |
8 | displayNSFW: boolean; | 8 | displayNSFW: boolean; |
9 | createdAt: Date; | 9 | createdAt: Date; |
10 | 10 | ||
@@ -12,7 +12,7 @@ export class User implements UserServerModel { | |||
12 | id: number, | 12 | id: number, |
13 | username: string, | 13 | username: string, |
14 | email: string, | 14 | email: string, |
15 | role: string, | 15 | role: UserRole, |
16 | displayNSFW?: boolean, | 16 | displayNSFW?: boolean, |
17 | createdAt?: Date, | 17 | createdAt?: Date, |
18 | }) { | 18 | }) { |