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

[Fix] isCoffeeChatActivate param 추가 #543

Merged
merged 5 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -88,7 +88,7 @@ public record MemberCareerResponse(
Boolean isCurrent
){}

public static MemberProfileSpecificResponse checkIsBlindPhone(MemberProfileSpecificResponse response, Boolean isMine) {
public static MemberProfileSpecificResponse checkIsBlindPhone(MemberProfileSpecificResponse response, Boolean isMine, Boolean isCoffeeChatActivate) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

메서드 인자로 isMine이랑 isCoffeeChatActivate를 받으니 메서드 명이 해당 로직과 일치하지 않는 것 같네요 더 좋은 메서드 명이 있을까요?

Copy link
Member Author

@jun02160 jun02160 Nov 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사실 phone만 마스킹하는 역할이라 해당 함수에서 response 객체를 새로 생성하는 것 자체가 별로이긴 합니다...
요거 개선하려면 Record -> DTO Class로 바꿔서 사용하는 방법이 있을 것 같은데 우선은 38c52d1에서 applyPhoneMasking()으로 변경했어요! 더 좋은 의견 있으시면 부탁드립니당

return new MemberProfileSpecificResponse(
response.name(),
response.profileImage(),
Expand All @@ -114,7 +114,7 @@ public static MemberProfileSpecificResponse checkIsBlindPhone(MemberProfileSpeci
response.projects(),
response.careers(),
response.allowOfficial(),
response.isCoffeeChatActivate(),
isCoffeeChatActivate,
isMine
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public ResponseEntity<MemberProfileSpecificResponse> getUserProfile (
memberMapper.toProfileSpecificResponse(
member, true, memberProfileProjects, activityResponses, soptActivityResponse, isCoffeeChatActivate
),
isMine);
isMine, isCoffeeChatActivate);
sortProfileCareer(response);
return ResponseEntity.status(HttpStatus.OK).body(response);
}
Expand Down
Loading