diff --git a/src/main/java/igoMoney/BE/dto/request/UserUpdateRequest.java b/src/main/java/igoMoney/BE/dto/request/UserUpdateRequest.java index b6439ff..41f7d5f 100644 --- a/src/main/java/igoMoney/BE/dto/request/UserUpdateRequest.java +++ b/src/main/java/igoMoney/BE/dto/request/UserUpdateRequest.java @@ -17,6 +17,5 @@ public class UserUpdateRequest { @NotEmpty private String nickname; private MultipartFile image; - @NotNull private Boolean imageChanged; // 프로필 이미지 변경 여부 } diff --git a/src/main/java/igoMoney/BE/service/UserService.java b/src/main/java/igoMoney/BE/service/UserService.java index e4521d4..9a61fe3 100644 --- a/src/main/java/igoMoney/BE/service/UserService.java +++ b/src/main/java/igoMoney/BE/service/UserService.java @@ -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());