From: Rigel Kent Date: Sun, 3 May 2020 14:23:09 +0000 (+0200) Subject: Only show updatedAt date of abuse if different from createdAt X-Git-Tag: v2.2.0-rc.1~122 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0db536f1e00e2f0c019b5ea3807f1d9125ff4f1d;p=oweals%2Fpeertube.git Only show updatedAt date of abuse if different from createdAt --- diff --git a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts index e87163c4f..83d194d52 100644 --- a/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts +++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.ts @@ -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 } }, diff --git a/client/src/app/shared/video-abuse/video-abuse.service.ts b/client/src/app/shared/video-abuse/video-abuse.service.ts index a39ad31d4..1ab6b5376 100644 --- a/client/src/app/shared/video-abuse/video-abuse.service.ts +++ b/client/src/app/shared/video-abuse/video-abuse.service.ts @@ -32,7 +32,6 @@ export class VideoAbuseService { return this.authHttp.get>(url, { params }) .pipe( - map(res => this.restExtractor.convertResultListDateToHuman(res)), catchError(res => this.restExtractor.handleError(res)) ) } diff --git a/shared/models/videos/abuse/video-abuse.model.ts b/shared/models/videos/abuse/video-abuse.model.ts index f2c2cdc41..bbef7f4f9 100644 --- a/shared/models/videos/abuse/video-abuse.model.ts +++ b/shared/models/videos/abuse/video-abuse.model.ts @@ -23,7 +23,7 @@ export interface VideoAbuse { } createdAt: Date - updatedAt: Date + updatedAt?: Date count?: number nth?: number