Client: fix compilation about the user created date

pull/10/head
Chocobozzz 2016-09-23 17:34:18 +02:00
parent c53d2a4e5e
commit 44c5275e1b
1 changed files with 5 additions and 2 deletions

View File

@ -4,11 +4,14 @@ export class User {
role: string; role: string;
createdDate: Date; createdDate: Date;
constructor(hash: { id: string, username: string, role: string, createdDate: Date }) { constructor(hash: { id: string, username: string, role: string, createdDate?: Date }) {
this.id = hash.id; this.id = hash.id;
this.username = hash.username; this.username = hash.username;
this.role = hash.role; this.role = hash.role;
this.createdDate = hash.createdDate;
if (hash.createdDate) {
this.createdDate = hash.createdDate;
}
} }
isAdmin() { isAdmin() {