Skip to content

Commit

Permalink
Updating schema and type fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
krckyboy committed Mar 23, 2024
1 parent bc5befd commit 2f54e3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cms/src/api/post/content-types/post/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
"relation": "manyToMany",
"target": "api::category.category",
"mappedBy": "posts"
},
"viewCount": {
"type": "integer",
"required": true,
"default": 0
}
}
}
3 changes: 2 additions & 1 deletion frontend/src/components/blog-post-item/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] }
}
}
Expand Down

0 comments on commit 2f54e3c

Please sign in to comment.