From 0e557c3f89b026ede3270ccf3646aade82e51d6b Mon Sep 17 00:00:00 2001 From: Kharec Date: Sat, 10 Jan 2026 22:33:29 +0100 Subject: [PATCH] feat: add SearchPostListDTO for search responses --- internal/dto/post.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/dto/post.go b/internal/dto/post.go index f7d9743..514be8b 100644 --- a/internal/dto/post.go +++ b/internal/dto/post.go @@ -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{}