@@ -12,7 +12,7 @@ import (
12
12
type (
13
13
PostService interface {
14
14
CreatePost (ctx context.Context , userId string , req dto.PostCreateRequest ) (dto.PostResponse , error )
15
- GetPostById (ctx context.Context , postId uint64 ) (dto.PostRepliesPaginationResponse , error )
15
+ GetPostById (ctx context.Context , postId uint64 , req dto. PaginationRequest ) (dto.PostRepliesPaginationResponse , error )
16
16
DeletePostById (ctx context.Context , postId uint64 ) error
17
17
UpdatePostById (ctx context.Context , userId string , postId uint64 , req dto.PostUpdateRequest ) (dto.PostResponse , error )
18
18
GetAllPosts (ctx context.Context , req dto.PaginationRequest ) (dto.PostPaginationResponse , error )
@@ -72,13 +72,13 @@ func (s *postService) CreatePost(ctx context.Context, userId string, req dto.Pos
72
72
}, nil
73
73
}
74
74
75
- func (s * postService ) GetPostById (ctx context.Context , postId uint64 ) (dto.PostRepliesPaginationResponse , error ) {
75
+ func (s * postService ) GetPostById (ctx context.Context , postId uint64 , req dto. PaginationRequest ) (dto.PostRepliesPaginationResponse , error ) {
76
76
post , err := s .postRepo .GetPostById (ctx , nil , postId )
77
77
if err != nil {
78
78
return dto.PostRepliesPaginationResponse {}, dto .ErrGetPostById
79
79
}
80
80
81
- replies , err := s .postRepo .GetAllPostRepliesWithPagination (ctx , nil , postId , dto. PaginationRequest {} )
81
+ replies , err := s .postRepo .GetAllPostRepliesWithPagination (ctx , nil , postId , req )
82
82
if err != nil {
83
83
return dto.PostRepliesPaginationResponse {}, dto .ErrGetPostReplies
84
84
}
0 commit comments