Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Commit 3baa935

Browse files
committed
0.3.6 - Update dtos for news
1 parent 0278f8f commit 3baa935

File tree

5 files changed

+33
-11
lines changed

5 files changed

+33
-11
lines changed

package-lock.json

Lines changed: 13 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@funixproductions/angular-core",
3-
"version": "0.3.5",
3+
"version": "0.3.6",
44
"description": "Package used in all FunixProductions Angular projects",
55
"scripts": {
66
"ng": "ng",

projects/funixproductions-requests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@funixproductions/funixproductions-requests",
3-
"version": "0.3.5",
3+
"version": "0.3.6",
44
"description": "Package used in all FunixProductions Angular projects",
55
"peerDependencies": {
66
"@angular/common": "^18.2.4",

projects/funixproductions-requests/src/lib/services/pacifista-api/web/news/dtos/comments/PacifistaNewsCommentDTO.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,24 @@ export class PacifistaNewsCommentDTO extends PacifistaNewsUserDataDTO {
1818
*/
1919
likes: number
2020

21+
/**
22+
* Nombre de réponses à ce commentaire
23+
*/
24+
replies: number
25+
26+
/**
27+
* Si l'utilisateur a liké ce commentaire (si authentifié)
28+
*/
29+
liked: boolean
30+
2131
constructor(news: PacifistaNewsDTO, content: string, parent?: PacifistaNewsCommentDTO) {
2232
super(news);
2333
this.content = content;
2434
this.parent = parent;
2535

2636
this.likes = 0;
37+
this.replies = 0;
38+
this.liked = false;
2739
}
2840

2941
}

projects/funixproductions-requests/src/lib/services/pacifista-api/web/news/dtos/news/PacifistaNewsDTO.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export class PacifistaNewsDTO extends ApiDTO {
6767
*/
6868
views: number
6969

70+
/**
71+
* Si l'utilisateur a liké l'article (si un utilisateur est authentifié)
72+
*/
73+
liked: boolean
74+
7075
constructor(name: string, title: string, subtitle: string, bodyHtml: string, bodyMarkdown: string, draft: boolean) {
7176
super();
7277
this.name = name;
@@ -82,6 +87,7 @@ export class PacifistaNewsDTO extends ApiDTO {
8287
this.likes = 0;
8388
this.comments = 0;
8489
this.views = 0;
90+
this.liked = false;
8591
}
8692

8793
}

0 commit comments

Comments
 (0)