@@ -12,7 +12,7 @@ import (
1212type (
1313 PostService interface {
1414 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 )
1616 DeletePostById (ctx context.Context , postId uint64 ) error
1717 UpdatePostById (ctx context.Context , userId string , postId uint64 , req dto.PostUpdateRequest ) (dto.PostResponse , error )
1818 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
7272 }, nil
7373}
7474
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 ) {
7676 post , err := s .postRepo .GetPostById (ctx , nil , postId )
7777 if err != nil {
7878 return dto.PostRepliesPaginationResponse {}, dto .ErrGetPostById
7979 }
8080
81- replies , err := s .postRepo .GetAllPostRepliesWithPagination (ctx , nil , postId , dto. PaginationRequest {} )
81+ replies , err := s .postRepo .GetAllPostRepliesWithPagination (ctx , nil , postId , req )
8282 if err != nil {
8383 return dto.PostRepliesPaginationResponse {}, dto .ErrGetPostReplies
8484 }
0 commit comments