Skip to content

Commit

Permalink
Type: 프로필 이미지 수정 요청 - NoNull 조건 수정 (#57)
Browse files Browse the repository at this point in the history
[Chore] 프로필 이미지 수정 요청 - NoNull 수정
  • Loading branch information
pingowl authored Oct 17, 2023
2 parents ca10f33 + 13f0aea commit fe89b53
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 fe89b53

Please sign in to comment.