Add tag filtering to ListPosts and enhance ListTags with post count
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 53s

This commit is contained in:
2025-10-26 16:00:30 +08:00
parent a8b2457762
commit df712e8715
4 changed files with 81 additions and 23 deletions

View File

@@ -80,8 +80,9 @@ type (
type (
ListPostsReq {
Page int `json:"page"` // Page number for pagination (1-based)
PageSize int `json:"pageSize"` // Number of posts per page
TagIds []string `json:"tagIds,optional"` // Array of tag IDs to filter posts (optional)
Page int `json:"page"` // Page number for pagination (1-based)
PageSize int `json:"pageSize"` // Number of posts per page
}
ListPostsResp {
Posts []ListPostsRespPosts `json:"posts"` // Array of blog posts
@@ -102,8 +103,9 @@ type (
Tags []ListTagsRespTags `json:"tags"` // Array of blog tags
}
ListTagsRespTags {
TagId string `json:"tagId"` // Unique identifier of the tag
TagName string `json:"tagName"` // Name of the tag
TagId string `json:"tagId"` // Unique identifier of the tag
TagName string `json:"tagName"` // Name of the tag
PostCount int `json:"postCount"` // Number of posts associated with the tag
}
)