Skip to content

Commit

Permalink
Merge pull request #52 from VOM-Project/fix/vomvom
Browse files Browse the repository at this point in the history
fix: 봄봄이 수락되면 봄봄 수 증가하도록 수정
  • Loading branch information
okodeee authored Nov 24, 2024
2 parents 2d85ccf + 7af85e8 commit 8304a7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/vom/spring/domain/member/domain/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ public void updateProfileImg(String profileImgName, String profileImgUrl) {
this.profileImgName = profileImgName;
this.profileImgUrl = profileImgUrl;
}

public void updateVomVomCount(){
this.vomVomCount++;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public VomvomResponseDto.AcceptVomvomDto acceptRequest (VomvomRequestDto.AcceptV
Vomvom vomvom = vomvomRepository.findByFromMemberAndToMember(fromMember, toMember).orElseThrow(() -> new IllegalArgumentException("존재하지 않은 친구 신청입니다"));
if (vomvom.isVomvom() == false) {
vomvom.updateIsVomvom();
toMember.updateVomVomCount();
fromMember.updateVomVomCount();
}
return VomvomResponseDto.AcceptVomvomDto.builder()
.isVomvom(vomvom.isVomvom())
Expand Down

0 comments on commit 8304a7d

Please sign in to comment.