Skip to content

Commit 51ae689

Browse files
authored
refactor: 멘토의 마이페이지 응답에 '합격 팁' 추가 (#420)
* refactor: 중복되는 페이지네이션 설정 제거 * refactor: 멘토의 마이페이지 조회시, '합격 팁'을 포함하도록 - '멘토의 마이페이지 조회' api를 미리보기와 상세 보기에 모두 사용하게 한다. - 이를 위해, 마이페이지 응답이 전체 정보를 내려주도록 한다.
1 parent fd60791 commit 51ae689

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/example/solidconnection/mentor/controller/MentorController.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package com.example.solidconnection.mentor.controller;
22

3-
import static org.springframework.data.domain.Sort.Direction.DESC;
4-
53
import com.example.solidconnection.common.dto.SliceResponse;
64
import com.example.solidconnection.common.resolver.AuthorizedUser;
75
import com.example.solidconnection.mentor.dto.MentorDetailResponse;
@@ -41,7 +39,7 @@ public ResponseEntity<SliceResponse<MentorPreviewResponse>> getMentorPreviews(
4139
@AuthorizedUser long siteUserId,
4240
@RequestParam("region") String region,
4341

44-
@PageableDefault(size = 3, sort = "menteeCount", direction = DESC)
42+
@PageableDefault(size = 3)
4543
@SortDefaults({
4644
@SortDefault(sort = "menteeCount", direction = Sort.Direction.DESC),
4745
@SortDefault(sort = "id", direction = Sort.Direction.ASC)

src/main/java/com/example/solidconnection/mentor/dto/MentorMyPageResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public record MentorMyPageResponse(
1515
int menteeCount,
1616
boolean hasBadge,
1717
String introduction,
18+
String passTip,
1819
List<ChannelResponse> channels
1920
) {
2021

@@ -29,6 +30,7 @@ public static MentorMyPageResponse of(Mentor mentor, SiteUser siteUser, Universi
2930
mentor.getMenteeCount(),
3031
mentor.isHasBadge(),
3132
mentor.getIntroduction(),
33+
mentor.getPassTip(),
3234
mentor.getChannels().stream()
3335
.map(ChannelResponse::from)
3436
.toList()

0 commit comments

Comments
 (0)