Skip to content

Commit

Permalink
Merge pull request #57 from Journey-Together/feature/#14
Browse files Browse the repository at this point in the history
fix : profile update
  • Loading branch information
sycuuui authored Jun 8, 2024
2 parents 49a628d + 34ffee0 commit cf89267
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public void saveInfo(Member member,MemberReq memberReq){
member.setPhone(memberReq.phone());
}
if (memberReq.profileImage() != null) {
String uuid = s3Client.update(member.getProfileUuid(),memberReq.profileImage());
member.setProfileUuid(uuid);
s3Client.update(member.getProfileUuid()+"/profile",memberReq.profileImage());
}
if (memberReq.bloodType() != null) {
member.setBloodType(memberReq.bloodType());
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/Journey/Together/global/util/S3Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public String upload(MultipartFile multipartFile, String folderName, String imag
return baseUrl+url;
}

public String update(String fileName, MultipartFile newFile) {
public void update(String fileName, MultipartFile newFile) {
// Validation
if(newFile.isEmpty()) {
throw new ApplicationException(ErrorCode.INVALID_VALUE_EXCEPTION);
Expand All @@ -84,9 +84,6 @@ public String update(String fileName, MultipartFile newFile) {
} catch (IOException e) {
throw new ApplicationException(ErrorCode.INTERNAL_SERVER_EXCEPTION);
}

// Response
return fileName;
}

public String getUrl(){
Expand Down

0 comments on commit cf89267

Please sign in to comment.