Skip to content

Commit

Permalink
[#495] del: 기본 프로필 여부 삭제, 랜덤 url API 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
jyajoo committed Nov 13, 2024
1 parent 87e6aaf commit 16b98c0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import static com.jeju.nanaland.global.exception.SuccessCode.GET_RECOMMENDED_POSTS_SUCCESS;
import static com.jeju.nanaland.global.exception.SuccessCode.JOIN_SUCCESS;
import static com.jeju.nanaland.global.exception.SuccessCode.LOGIN_SUCCESS;
import static com.jeju.nanaland.global.exception.SuccessCode.RANDOM_URL_SUCCESS;
import static com.jeju.nanaland.global.exception.SuccessCode.REISSUE_TOKEN_SUCCESS;
import static com.jeju.nanaland.global.exception.SuccessCode.UPDATE_LANGUAGE_SUCCESS;
import static com.jeju.nanaland.global.exception.SuccessCode.UPDATE_MEMBER_CONSENT_SUCCESS;
Expand Down Expand Up @@ -296,16 +295,4 @@ public BaseResponse<Void> validateNickname(
}
return BaseResponse.success(VALID_NICKNAME_SUCCESS);
}

@Operation(
summary = "랜덤 프로필 url 조회", description = "랜덤 프로필 url이 응답됩니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공"),
@ApiResponse(responseCode = "401", description = "accessToken이 유효하지 않은 경우", content = @Content),
})
@GetMapping("/randomProfile")
public BaseResponse<String> getRandomProfileImageUrl() {
String randomProfileImageUrl = memberProfileService.getRandomImageFile().getOriginUrl();
return BaseResponse.success(RANDOM_URL_SUCCESS, randomProfileImageUrl);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ public static class ProfileDto {
List<ConsentItemDto> consentItems;
@Schema(description = "내 프로필인지 확인 여부")
private boolean isMyProfile;
@Schema(description = "기본 프로필인지 확인 여부")
private boolean isDefault;
@Schema(description = "유저 Id")
private Long memberId;
@Schema(description = "이메일")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,8 @@ public MemberResponse.ProfileDto getMemberProfile(MemberInfoDto memberInfoDto, L
).toList();
}

boolean isDefault = defaultProfile.stream()
.anyMatch(member.getProfileImageFile().getOriginUrl()::contains);

return MemberResponse.ProfileDto.builder()
.isMyProfile(isMyProfile)
.isDefault(isDefault)
.consentItems(consentItems)
.memberId(member.getId())
.email(member.getEmail())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public enum SuccessCode {
UPDATE_MEMBER_PROFILE_SUCCESS(OK, "사용자 프로필 수정 성공"),
GET_MEMBER_PROFILE_SUCCESS(OK, "사용자 프로필 조회 성공"),
UPDATE_LANGUAGE_SUCCESS(OK, "언어 변경 성공"),
RANDOM_URL_SUCCESS(OK, "랜덤 기본 프로필 URL 조회 성공"),

// search
SEARCH_SUCCESS(OK, "검색에 성공했습니다."),
Expand Down

0 comments on commit 16b98c0

Please sign in to comment.