feat: add SearchPostListDTO for search responses

This commit is contained in:
2026-01-10 22:33:29 +01:00
parent 56770955d4
commit 0e557c3f89

View File

@@ -29,6 +29,14 @@ type PostListDTO struct {
Offset int `json:"offset"`
}
type SearchPostListDTO struct {
Posts []PostDTO `json:"posts"`
Count int `json:"count"`
Query string `json:"query"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
func ToPostDTO(post *database.Post) PostDTO {
if post == nil {
return PostDTO{}