Skip to content

Commit

Permalink
fix: #25 유저정보 반환 KEY 값 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ehs208 committed Nov 13, 2024
1 parent ea3b662 commit b403139
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ public class UserProfileResponseDto {
private int followingsCount;

@JsonProperty("isFollowing")
private boolean isFollowing;
private Boolean isFollowing;

@JsonProperty("isMyProfile")
private boolean isMyProfile;
private Boolean isMyProfile;

@Builder
private UserProfileResponseDto(String email, String customId, String userName, String profileImageUrl,
String backgroundProfileImageUrl, String phoneNumber, String description, String websiteUrl, String location,
int userBirthYear, int userBirthMonth, int userBirthDay, int followersCount, int followingsCount,
boolean isFollowing, boolean isMyProfile) {
Boolean isFollowing, Boolean isMyProfile) {
this.email = email;
this.customId = customId;
this.userName = userName;
Expand All @@ -54,8 +54,8 @@ private UserProfileResponseDto(String email, String customId, String userName, S
this.isFollowing = isFollowing;
}

public static UserProfileResponseDto from(User user, int followersCount, int followingsCount, boolean isFollowing,
boolean isMyProfile) {
public static UserProfileResponseDto from(User user, int followersCount, int followingsCount, Boolean isFollowing,
Boolean isMyProfile) {
return UserProfileResponseDto.builder()
.email(user.getEmail())
.customId(user.getCustomId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public UserProfileResponseDto getProfile(HttpServletRequest request) {

int followerCount = followRepository.countByFollowing(user);
int followingCount = followRepository.countByFollower(user);

return UserProfileResponseDto.from(user, followerCount, followingCount, false, true);
}

Expand All @@ -66,8 +66,8 @@ public UserProfileResponseDto getProfileWithoutToken(String customId, HttpServle
User myinfo = getUser(request);
User user = userRepository.findByCustomId(customId).orElseThrow(UserNotFoundException::new);

boolean isMyProfile = myinfo.equals(user);
boolean isFollowing = followRepository.findByFollowerAndFollowing(myinfo, user).isPresent();
Boolean isMyProfile = myinfo.equals(user);
Boolean isFollowing = followRepository.findByFollowerAndFollowing(myinfo, user).isPresent();

int followerCount = followRepository.countByFollowing(user);
int followingCount = followRepository.countByFollower(user);
Expand Down

0 comments on commit b403139

Please sign in to comment.