Skip to content

Commit

Permalink
photo validation 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
youngreal committed Nov 20, 2024
1 parent dbb327e commit f3d290c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void updateRecord(
/**
* org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'DELETE' is not supported 예외로 인해 PostMapping으로 변경
*/
@PostMapping("/maps/history/{recordId}")
@DeleteMapping("/maps/history/{recordId}")
public void deleteRecord(
AuthenticationMember authenticationMember,
@PathVariable long recordId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ public class PhotoValidator implements ConstraintValidator<PhotoValidation, List

@Override
public boolean isValid(List<MultipartFile> photos, ConstraintValidatorContext context) {
return photos.size() <= 3;
if (photos != null && photos.size() > 3) {
return false;
}
return true;
}
}

0 comments on commit f3d290c

Please sign in to comment.