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

@@ -53,8 +53,9 @@ type GetPostResp struct {
}
type ListPostsReq struct {
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
}
type ListPostsResp struct {
@@ -78,8 +79,9 @@ type ListTagsResp struct {
}
type ListTagsRespTags struct {
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
}
type PingReq struct {