]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/users/user.model.ts
Client: Handle NSFW video
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / users / user.model.ts
index 726495d1182721d095bcca3e11ee72da5b782cb5..f7859f495929ae257c767c76b6f5b0953580b1ad 100644 (file)
@@ -1,16 +1,24 @@
 export class User {
-  id: string;
+  id: number;
   username: string;
   role: string;
-  createdDate: Date;
+  displayNSFW: boolean;
+  createdAt: Date;
 
-  constructor(hash: { id: string, username: string, role: string, createdDate?: Date }) {
+  constructor(hash: {
+    id: number,
+    username: string,
+    role: string,
+    displayNSFW?: boolean,
+    createdAt?: Date,
+  }) {
     this.id = hash.id;
     this.username = hash.username;
     this.role = hash.role;
+    this.displayNSFW = hash.displayNSFW;
 
-    if (hash.createdDate) {
-      this.createdDate = hash.createdDate;
+    if (hash.createdAt) {
+      this.createdAt = hash.createdAt;
     }
   }