Skip to content

Commit

Permalink
feat: comment paging result list reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
ohksj77 committed Feb 15, 2025
1 parent 3ccf073 commit a7ab0e0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.example.comment.controller.dto.param.CommentApiParam;
import com.example.comment.error.CommentError;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.UUID;
Expand Down Expand Up @@ -69,8 +70,9 @@ public PaginationServiceResponse<CommentApiParam> getComments(
.createdAt(DateTimeUtil.formatDateTime(comment.createdAt()))
.build();
})
.toList();
.collect(Collectors.toList());

Collections.reverse(commentApiParams);
return PaginationServiceResponse.of(commentApiParams, commentsByPagination.hasNext());
}
}

0 comments on commit a7ab0e0

Please sign in to comment.