diff options
Diffstat (limited to 'client/src/app/core/auth/auth-user.model.ts')
-rw-r--r-- | client/src/app/core/auth/auth-user.model.ts | 5 |
1 files changed, 3 insertions, 2 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) { |