Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat recommend #204

Merged
merged 1 commit into from
May 29, 2024
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
Expand Up @@ -240,5 +240,5 @@ public ResponseEntity<APIResponse> updateProfileSetting(
settingRequest.recommendOn());
return ResponseEntity.ok(APIResponse.success());
}

}
7 changes: 5 additions & 2 deletions src/main/java/org/capstone/maru/dto/MemberProfileDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ public record MemberProfileDto(
String profileImage,
FeatureCardDto myCard,
FeatureCardDto mateCard,
List<SharedRoomPostResponse> posts
List<SharedRoomPostResponse> posts,
Boolean recommendOn
) {

public static MemberProfileDto from(String imgURL, FeatureCard myCard,
FeatureCard mateCard,
AuthResponse authResponse,
List<SharedRoomPostResponse> posts
List<SharedRoomPostResponse> posts,
Boolean recommendOn
) {
return MemberProfileDto
.builder()
Expand All @@ -27,6 +29,7 @@ public static MemberProfileDto from(String imgURL, FeatureCard myCard,
.mateCard(FeatureCardDto.from(mateCard))
.authResponse(authResponse)
.posts(posts)
.recommendOn(recommendOn)
.build();
}
}
3 changes: 2 additions & 1 deletion src/main/java/org/capstone/maru/service/ProfileService.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public MemberProfileDto getMemberProfile(String memberId, String gender) {

AuthResponse authResponse = AuthResponse.from(memberAccount);

return MemberProfileDto.from(imgURL, myCard, mateCard, authResponse, memberPosts);
return MemberProfileDto.from(imgURL, myCard, mateCard, authResponse, memberPosts,
memberAccount.getRecommendOn());
}

@Transactional
Expand Down