Only show updatedAt date of abuse if different from createdAt
authorRigel Kent <sendmemail@rigelk.eu>
Sun, 3 May 2020 14:23:09 +0000 (16:23 +0200)
committerRigel Kent <par@rigelk.eu>
Mon, 4 May 2020 13:01:44 +0000 (15:01 +0200)
client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts
client/src/app/shared/video-abuse/video-abuse.service.ts
shared/models/videos/abuse/video-abuse.model.ts

index e87163c4f80d9ae6d51791679f2a93fdb3c2860c..83d194d5246ede884157ebd906061c73e8630f2d 100644 (file)
@@ -289,6 +289,7 @@ export class VideoAbuseListComponent extends RestTable implements OnInit, AfterV
               embedHtml: this.sanitizer.bypassSecurityTrustHtml(this.getVideoEmbed(abuse)),
               reporterAccount: new Account(abuse.reporterAccount)
             })
+            if (abuse.updatedAt === abuse.createdAt) delete abuse.updatedAt
           }
 
         },
index a39ad31d491ee897da6af579f563ce336c95a0e5..1ab6b5376139cb3cb6830aac94a6c88f5f93b65a 100644 (file)
@@ -32,7 +32,6 @@ export class VideoAbuseService {
 
     return this.authHttp.get<ResultList<VideoAbuse>>(url, { params })
                .pipe(
-                 map(res => this.restExtractor.convertResultListDateToHuman(res)),
                  catchError(res => this.restExtractor.handleError(res))
                )
   }
index f2c2cdc415d99b07d2b9079f0d86fab7ee721474..bbef7f4f9db6b9f251229dbe344b65843f44f98b 100644 (file)
@@ -23,7 +23,7 @@ export interface VideoAbuse {
   }
 
   createdAt: Date
-  updatedAt: Date
+  updatedAt?: Date
 
   count?: number
   nth?: number