]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/users/user.model.ts
Server: Add NSFW in user profile
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / users / user.model.ts
index b775cb8e7bc08c6321920907e4708a4fc0f1a18a..52d89e0049f53991d6686fcc99d68fe3537ab802 100644 (file)
@@ -1,14 +1,17 @@
 export class User {
-  id: string;
+  id: number;
   username: string;
   role: string;
-  createdDate: Date;
+  createdAt: Date;
 
-  constructor(hash: { id: string, username: string, role: string, createdDate: Date }) {
+  constructor(hash: { id: number, username: string, role: string, createdAt?: Date }) {
     this.id = hash.id;
     this.username = hash.username;
     this.role = hash.role;
-    this.createdDate = hash.createdDate;
+
+    if (hash.createdAt) {
+      this.createdAt = hash.createdAt;
+    }
   }
 
   isAdmin() {