Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
[BM-289] 🩹 userId -> username 으로 응답 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
waterfogSW committed Aug 9, 2022
1 parent 3d45606 commit b653db2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ public class ChatRoomSelectResponse {
@Builder(access = PRIVATE)
@RequiredArgsConstructor(access = PRIVATE)
private static class ProductInfo {

@Positive
private final long productId;

@NotBlank
private final String thumbnailImg;
}
Expand All @@ -55,8 +57,10 @@ private static class ProductInfo {
@Builder(access = PRIVATE)
@RequiredArgsConstructor(access = PRIVATE)
private static class OpponentUserInfo {
@Positive
private final long userId;

@NotBlank
private final String username;

@NotBlank
private final String profileImg;
}
Expand All @@ -76,7 +80,7 @@ public static ChatRoomSelectResponse of(
.build();

OpponentUserInfo opponentUserInfo = OpponentUserInfo.builder()
.userId(opponent.getId())
.username(opponent.getUsername())
.profileImg(opponent.getProfileImage())
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ void ItResponseChatRoomList() throws Exception {
.type(JsonFieldType.NUMBER).description("상품 번호"),
fieldWithPath("[].productInfo.thumbnailImg")
.type(JsonFieldType.STRING).description("상품 이미지"),
fieldWithPath("[].opponentUserInfo.userId")
.type(JsonFieldType.NUMBER).description("상대방 유저 아이디"),
fieldWithPath("[].opponentUserInfo.username")
.type(JsonFieldType.STRING).description("상대방 유저명"),
fieldWithPath("[].opponentUserInfo.profileImg")
.type(JsonFieldType.STRING).description("상대방 유저 프로필"),
fieldWithPath("[].lastMessage")
Expand Down

0 comments on commit b653db2

Please sign in to comment.