Skip to content

Commit

Permalink
Merge pull request #170 from team-offonoff/member
Browse files Browse the repository at this point in the history
fix: 멤버의 프로필 이미지 삭제 후 db에서 null로 업데이트
  • Loading branch information
melonturtle authored Feb 13, 2024
2 parents 4dd81ea + 5549574 commit bc6d10d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ private void removeMembersProfileImage(Member member) {
String originalUrl = member.getProfileImageUrl();
if (originalUrl != null) {
s3Service.deleteFile(originalUrl);
member.removeProfileImageUrl();
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/life/offonoff/ab/domain/member/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,8 @@ public String updateProfileImageUrl(String imageUrl) {
this.profileImageUrl = imageUrl;
return this.profileImageUrl;
}

public void removeProfileImageUrl() {
this.profileImageUrl = null;
}
}

0 comments on commit bc6d10d

Please sign in to comment.