Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.example.solidconnection.mentor.controller;

import static org.springframework.data.domain.Sort.Direction.DESC;

import com.example.solidconnection.common.dto.SliceResponse;
import com.example.solidconnection.common.resolver.AuthorizedUser;
import com.example.solidconnection.mentor.dto.MentorDetailResponse;
Expand Down Expand Up @@ -41,7 +39,7 @@ public ResponseEntity<SliceResponse<MentorPreviewResponse>> getMentorPreviews(
@AuthorizedUser long siteUserId,
@RequestParam("region") String region,

@PageableDefault(size = 3, sort = "menteeCount", direction = DESC)
@PageableDefault(size = 3)
@SortDefaults({
@SortDefault(sort = "menteeCount", direction = Sort.Direction.DESC),
@SortDefault(sort = "id", direction = Sort.Direction.ASC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public record MentorMyPageResponse(
int menteeCount,
boolean hasBadge,
String introduction,
String passTip,
List<ChannelResponse> channels
) {

Expand All @@ -29,6 +30,7 @@ public static MentorMyPageResponse of(Mentor mentor, SiteUser siteUser, Universi
mentor.getMenteeCount(),
mentor.isHasBadge(),
mentor.getIntroduction(),
mentor.getPassTip(),
mentor.getChannels().stream()
.map(ChannelResponse::from)
.toList()
Expand Down
Loading