diff --git a/cms/src/api/post/content-types/post/schema.json b/cms/src/api/post/content-types/post/schema.json index 2a58b6c..4305116 100644 --- a/cms/src/api/post/content-types/post/schema.json +++ b/cms/src/api/post/content-types/post/schema.json @@ -40,6 +40,11 @@ "relation": "manyToMany", "target": "api::category.category", "mappedBy": "posts" + }, + "viewCount": { + "type": "integer", + "required": true, + "default": 0 } } } diff --git a/frontend/src/components/blog-post-item/types.ts b/frontend/src/components/blog-post-item/types.ts index fb42a5a..e83e131 100644 --- a/frontend/src/components/blog-post-item/types.ts +++ b/frontend/src/components/blog-post-item/types.ts @@ -8,9 +8,10 @@ export interface Post { publishedAt: string, title: string, summary: string, - featured: boolean, + isFeatured: boolean, slug: string; content: string; + viewCount: number; categories?: { data: Category[] } } }