Refactor pagination logic in ListPosts to enhance readability and maintainability
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 53s
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 53s
This commit is contained in:
@@ -62,7 +62,7 @@ func (l *ListPostsLogic) ListPosts(req *types.ListPostsReq) (resp *types.ListPos
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
var posts []types.ListPostsRespPosts
|
||||
posts := []types.ListPostsRespPosts{}
|
||||
for rows.Next() {
|
||||
var post types.ListPostsRespPosts
|
||||
var coverID sql.NullInt64
|
||||
|
||||
Reference in New Issue
Block a user