From 36a68a4582ee2ebdd1ed4c5e5fa1f1be6370215a Mon Sep 17 00:00:00 2001 From: Antonin Coquet <ext.sopra.acoquet@grandlyon.com> Date: Tue, 11 May 2021 11:40:13 +0200 Subject: [PATCH] fix: display updated_at instead of published_at --- src/app/post/components/post-card/post-card.component.html | 2 +- .../post/components/post-details/post-details.component.html | 2 +- src/app/post/models/post.model.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/post/components/post-card/post-card.component.html b/src/app/post/components/post-card/post-card.component.html index e32709a75..ff06f423a 100644 --- a/src/app/post/components/post-card/post-card.component.html +++ b/src/app/post/components/post-card/post-card.component.html @@ -27,7 +27,7 @@ </div> <div fxLayout="column" class="informations"> <div fxLayout="row"> - {{ post.published_at | date: 'shortDate' }} + {{ post.updated_at | date: 'shortDate' }} </div> <div fxLayout="row">par {{ post.author }}</div> </div> diff --git a/src/app/post/components/post-details/post-details.component.html b/src/app/post/components/post-details/post-details.component.html index 32e17b64f..3de9a5c04 100644 --- a/src/app/post/components/post-details/post-details.component.html +++ b/src/app/post/components/post-details/post-details.component.html @@ -24,7 +24,7 @@ <div fxLayout="column" class="informations" *ngIf="post.tags[0] && post.tags[0].slug != 'appels'"> <div fxLayout="row"> - {{ post.published_at | date: 'shortDate' }} + {{ post.updated_at | date: 'shortDate' }} </div> <div fxLayout="row">par {{ post.author }}</div> </div> diff --git a/src/app/post/models/post.model.ts b/src/app/post/models/post.model.ts index eb13ecef2..ea6fba084 100644 --- a/src/app/post/models/post.model.ts +++ b/src/app/post/models/post.model.ts @@ -4,6 +4,7 @@ import { Tag } from './tag.model'; export class Post { id: number; published_at: Date; + updated_at: Date; title: string; excerpt: string; feature_image: string; -- GitLab