feat: lecture, quiz 이미지 미포함 등록 불가 수정
This commit is contained in:
parent
a0b363d74f
commit
4cd713f580
@ -36,7 +36,7 @@ public class LectureController {
|
||||
return new ResponseEntity<>(HttpStatus.CONFLICT);
|
||||
}
|
||||
|
||||
if (!image.isEmpty() && !image.getContentType().startsWith("image")) {
|
||||
if (image != null && !image.getContentType().startsWith("image")) {
|
||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class QuizController {
|
||||
}
|
||||
|
||||
for (MultipartFile image : images) {
|
||||
if (!image.isEmpty() && !image.getContentType().startsWith("image")) {
|
||||
if (image != null && !image.getContentType().startsWith("image")) {
|
||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
@ -88,7 +88,7 @@ public class QuizController {
|
||||
}
|
||||
|
||||
for (MultipartFile image : images) {
|
||||
if (!image.isEmpty() && !image.getContentType().startsWith("image")) {
|
||||
if (image != null && !image.getContentType().startsWith("image")) {
|
||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user