Fix client compilation

pull/71/head
Chocobozzz 2017-06-16 11:01:45 +02:00
parent ee9e7b61f5
commit 46757b477c
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,5 @@
// Do not use the barrel (dependency loop)
import { UserRole } from '../../../../../shared/models/user.model'
import { User } from '../../shared/users/user.model';
export class AuthUser extends User {
@ -20,7 +21,7 @@ export class AuthUser extends User {
id: parseInt(localStorage.getItem(this.KEYS.ID)),
username: localStorage.getItem(this.KEYS.USERNAME),
email: localStorage.getItem(this.KEYS.EMAIL),
role: localStorage.getItem(this.KEYS.ROLE),
role: localStorage.getItem(this.KEYS.ROLE) as UserRole,
displayNSFW: localStorage.getItem(this.KEYS.DISPLAY_NSFW) === 'true'
},
Tokens.load()
@ -41,7 +42,7 @@ export class AuthUser extends User {
constructor(userHash: {
id: number,
username: string,
role: string,
role: UserRole,
email: string,
displayNSFW: boolean
}, hashTokens: any) {

View File

@ -1,10 +1,10 @@
import { User as UserServerModel } from '../../../../../shared';
import { User as UserServerModel, UserRole } from '../../../../../shared';
export class User implements UserServerModel {
id: number;
username: string;
email: string;
role: string;
role: UserRole;
displayNSFW: boolean;
createdAt: Date;
@ -12,7 +12,7 @@ export class User implements UserServerModel {
id: number,
username: string,
email: string,
role: string,
role: UserRole,
displayNSFW?: boolean,
createdAt?: Date,
}) {