Skip to content

Commit

Permalink
fix: 개별 타입 response totalSize field 추가 (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunom authored Dec 23, 2023
2 parents 29db1a1 + 3f1aa74 commit 7924c49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/sopt/app/facade/PokeFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public EachRelationFriendList getAllFriendByFriendship(User user, Friendship fri
}).toList();
return EachRelationFriendList.of(
allOfPokeWithFriends,
allOfPokeWithFriends.size(),
// TODO: 여기서 필요한 PageSize의 값이 조회 결과 리스트의 Elements Size 인지,
// 이후 API 재호출 시 사용할 RequestParam 값을 위해 넣어주는 건지 논의
pageable.getPageSize(),
Expand Down
14 changes: 9 additions & 5 deletions src/main/java/org/sopt/app/presentation/poke/PokeResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,20 @@ public static AllRelationFriendList of(
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@ToString
public static class EachRelationFriendList implements FriendList{

@Schema(description = "친구 리스트")
private List<SimplePokeProfile> friendList;
private Integer pageSize;
private Integer pageNum;
@Schema(description = "친구 수", example = "1")
private int totalSize;
@Schema(description = "페이지 사이즈", example = "1")
private int pageSize;
@Schema(description = "페이지 번호", example = "1")
private int pageNum;

public static EachRelationFriendList of(
List<SimplePokeProfile> friendList, Integer pageSize, Integer pageNum
List<SimplePokeProfile> friendList, int totalSize, int pageSize, int pageNum
) {
return new EachRelationFriendList(
friendList, pageSize, pageNum
friendList, totalSize, pageSize, pageNum
);
}

Expand Down

0 comments on commit 7924c49

Please sign in to comment.