Skip to content

Commit

Permalink
refactor : 자잘한 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lalabulla committed Dec 2, 2024
1 parent 79fd35b commit 6710025
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.springframework.data.jpa.repository.JpaRepository;

public interface VolunteerRepository extends JpaRepository<Volunteer, Long> {
Long countByPostAndStatusAndActiveStatus(Post post, Infos.InvieteStatus status);
Long countByPostAndStatus(Post post, Infos.InvieteStatus status);

boolean existsByUserAndPost(User user, Post post);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public PostOneResponse getPost(long postId, long userId) {
boolean isWriter = userId == (post.getUser().getId());
log.info("[Post : {}] is Wriiten By {} ? : {}", postId, userId, isWriter);

int invitedCount = Math.toIntExact(volunteerRepository.countByPostAndStatusAndActiveStatus(post, Infos.InvieteStatus.ACCESS));
int invitedCount = Math.toIntExact(volunteerRepository.countByPostAndStatus(post, Infos.InvieteStatus.ACCESS));
return PostOneResponse.toDto(post, invitedCount, isWriter);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void updateProfile(User user, UserProfile.ChangeRequest changeRequest, Mu
userRepository.save(user);

log.info("사용자 닉네임 : {}, 위치 : {}, 생년 : {}, 성별 : {}, 한줄소개 : {}, 활동내역 공개 여부 : {}, 프로필 이미지 Url : {}",
user.getNickname(), user.getLocation(), user.getBirthYear(), user.getGender().getInfo(), user.getComment(), user.isShowStatus(), user.getProfileImageUrl());
user.getNickname(), user.getLocation(), user.getBirthYear(), user.getGender().getDescription(), user.getComment(), user.isShowStatus(), user.getProfileImageUrl());
}

private Integer validateBirthYear(String integer) {
Expand Down

0 comments on commit 6710025

Please sign in to comment.