Skip to content

Commit

Permalink
Chore: 프로필 이미지 수정 요청 - NoNull 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
pingowl committed Oct 17, 2023
1 parent ca10f33 commit 13f0aea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ public class UserUpdateRequest {
@NotEmpty
private String nickname;
private MultipartFile image;
@NotNull
private Boolean imageChanged; // 프로필 이미지 변경 여부
}
3 changes: 3 additions & 0 deletions src/main/java/igoMoney/BE/service/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public void updateUser(UserUpdateRequest request) throws IOException {

User findUser = getUserOrThrow(request.getId());
String image = null;
if (request.getImageChanged() == null){
request.setImageChanged(false);
}

if (!request.getNickname().equals(findUser.getNickname())) {
checkNicknameDuplicate(request.getNickname());
Expand Down

0 comments on commit 13f0aea

Please sign in to comment.