Skip to content

Commit

Permalink
fix: 프로필에서 MainImg를 수정하면 Member 엔티티에도 반영하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
devFancy committed Nov 8, 2023
1 parent 6aab5b0 commit ad5a092
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/hibit2/hibit2/member/domain/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ public String getMainImg() {
return mainImg;
}

public void updateMainImg(String mainImg) {
this.mainImg = mainImg;
}
public void AddReport(){this.report += 1;}
public boolean getIsprofile(){ return isProfile;}
public void setIsprofile(){this.isProfile=true;}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public void updateProfile(final Long memberId, final ProfileUpdateRequest reques
Member member = memberRepository.getById(memberId);

member.updateNickname(request.getNickname());
member.updateMainImg(request.getMainImg());
memberRepository.save(member);

Profile profile = profileRepository.findByMemberId(memberId)
Expand Down

0 comments on commit ad5a092

Please sign in to comment.