diff --git a/src/app/core/models/comment.model.ts b/src/app/core/models/comment.model.ts index 0cce1157..8b9f939b 100644 --- a/src/app/core/models/comment.model.ts +++ b/src/app/core/models/comment.model.ts @@ -1,7 +1,5 @@ -import { User } from './user.model'; - export class Comment { - constructor(public text: string, public pseudo: string, public created_at: string) {} + constructor(public id: string, public text: string, public pseudo: string, public created_at: string) {} public static sortChronologically(first: Comment, second: Comment): number { const a = new Date(first.created_at); diff --git a/src/app/shared/components/comments/comments.component.html b/src/app/shared/components/comments/comments.component.html index 22bd3962..f3ca856e 100644 --- a/src/app/shared/components/comments/comments.component.html +++ b/src/app/shared/components/comments/comments.component.html @@ -67,10 +67,12 @@
{{ comment.pseudo }} , - + il y a - {{ calculateDaysAgoOfComment(comment.date.date) }} jours, le {{ comment.date.date }} + {{ calculateDaysAgoOfComment(comment.created_at) }} jours, le + {{ comment.created_at | date: 'short':'Europe/Paris':'fr_FR' }} +