Skip to content

Commit f3d290c

Browse files
committed
photo validation ��
1 parent dbb327e commit f3d290c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/java/com/dnd/dndtravel/map/controller/MapController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void updateRecord(
7272
/**
7373
* org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'DELETE' is not supported 예외로 인해 PostMapping으로 변경
7474
*/
75-
@PostMapping("/maps/history/{recordId}")
75+
@DeleteMapping("/maps/history/{recordId}")
7676
public void deleteRecord(
7777
AuthenticationMember authenticationMember,
7878
@PathVariable long recordId

src/main/java/com/dnd/dndtravel/map/controller/request/validation/PhotoValidator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ public class PhotoValidator implements ConstraintValidator<PhotoValidation, List
1111

1212
@Override
1313
public boolean isValid(List<MultipartFile> photos, ConstraintValidatorContext context) {
14-
return photos.size() <= 3;
14+
if (photos != null && photos.size() > 3) {
15+
return false;
16+
}
17+
return true;
1518
}
1619
}

0 commit comments

Comments
 (0)