From 654c28a5494f7aa222fd3e6d724dbbae597e5409 Mon Sep 17 00:00:00 2001 From: hangyeol Date: Thu, 9 Nov 2023 14:26:15 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20GetMyPageResponse=EC=97=90=20id?= =?UTF-8?q?=EB=8F=84=20=EB=A6=AC=ED=84=B4=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/member/dto/response/GetMyPageResponse.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/main/java/com/graphy/backend/domain/member/dto/response/GetMyPageResponse.java b/backend/src/main/java/com/graphy/backend/domain/member/dto/response/GetMyPageResponse.java index 61a08925..babaa183 100644 --- a/backend/src/main/java/com/graphy/backend/domain/member/dto/response/GetMyPageResponse.java +++ b/backend/src/main/java/com/graphy/backend/domain/member/dto/response/GetMyPageResponse.java @@ -11,6 +11,7 @@ @AllArgsConstructor(access = AccessLevel.PRIVATE) @NoArgsConstructor public class GetMyPageResponse { + private Long id; private String nickname; private String introduction; private int followerCount; @@ -20,6 +21,7 @@ public class GetMyPageResponse { public static GetMyPageResponse of(Member member, List getProjectInfoResponseList) { return GetMyPageResponse.builder() + .id(member.getId()) .nickname(member.getNickname()) .introduction(member.getIntroduction()) .followerCount(member.getFollowerCount()) From 2349b3d7b8824bd09249b194ae89168e56be2209 Mon Sep 17 00:00:00 2001 From: hangyeol Date: Thu, 9 Nov 2023 14:26:33 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20MyPage=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/member/controller/MemberControllerTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/test/java/com/graphy/backend/domain/member/controller/MemberControllerTest.java b/backend/src/test/java/com/graphy/backend/domain/member/controller/MemberControllerTest.java index 1855b6f7..c911905c 100644 --- a/backend/src/test/java/com/graphy/backend/domain/member/controller/MemberControllerTest.java +++ b/backend/src/test/java/com/graphy/backend/domain/member/controller/MemberControllerTest.java @@ -129,6 +129,7 @@ void findMemberTest() throws Exception { @DisplayName("현재 로그인한 사용자의 정보로 마이페이지를 조회한다") void getMyPageTest() throws Exception { GetMyPageResponse result = GetMyPageResponse.builder() + .id(member1.getId()) .nickname(member1.getNickname()) .introduction(member1.getIntroduction()) .followerCount(member1.getFollowerCount()) @@ -149,6 +150,7 @@ void getMyPageTest() throws Exception { .andDo(print()) .andExpect(status().isOk()) + .andExpect(jsonPath("$.data.id").value((member1.getId()))) .andExpect(jsonPath("$.data.nickname").value(member1.getNickname())) .andExpect(jsonPath("$.data.introduction").value(member1.getIntroduction())) .andExpect(jsonPath("$.data.followerCount").value(member1.getFollowerCount())) @@ -169,6 +171,7 @@ void getMyPageTest() throws Exception { fieldWithPath("message").description("응답 메시지"), fieldWithPath("data").description("응답 데이터"), + fieldWithPath("data.id").description("유저 PK"), fieldWithPath("data.nickname").description("닉네임"), fieldWithPath("data.introduction").description("본인 소개"), fieldWithPath("data.followerCount").description("팔로워 수"),