Skip to content

Commit

Permalink
[refactor] 친구의 펀딩아이템 조회 서비스 로직 수정(#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwan2-99 committed Jun 19, 2024
1 parent 83e8ac8 commit 3f3e835
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ public ProgressResponse getMyFundingProgress(String providerId) {
public ProgressResponse getFriendFundingProgress(String providerId, FriendFundingInquiryRequest inquiryRequest) {
Member self = findMemberByProviderId(providerId);
Member friend = findMemberByProviderId(inquiryRequest.getFriendProviderId()); //todo 친구 검증 메소드 추가해야함
Funding funding = findByIdAndMemberId(inquiryRequest.getFundingId(), friend.getMemberId());

Funding funding = fundingRepository.findByMemberIdAndStatus(friend.getMemberId(), FundingStatus.PROGRESS)
.orElse(null);

if (funding == null) {
return new ProgressResponse();
}
return getFundingProgress(funding.getFundingId(), friend.getMemberId());
}

Expand Down

0 comments on commit 3f3e835

Please sign in to comment.