Merge branch 'be/lecture' into 'backend'
feat: lecture, quiz 이미지 미포함 등록 불가 수정 See merge request s11-webmobile1-sub2/S11P12A701!176
This commit is contained in:
commit
1d307c006d
@ -36,7 +36,7 @@ public class LectureController {
|
|||||||
return new ResponseEntity<>(HttpStatus.CONFLICT);
|
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);
|
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ public class QuizController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (MultipartFile image : images) {
|
for (MultipartFile image : images) {
|
||||||
if (!image.isEmpty() && !image.getContentType().startsWith("image")) {
|
if (image != null && !image.getContentType().startsWith("image")) {
|
||||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ public class QuizController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (MultipartFile image : images) {
|
for (MultipartFile image : images) {
|
||||||
if (!image.isEmpty() && !image.getContentType().startsWith("image")) {
|
if (image != null && !image.getContentType().startsWith("image")) {
|
||||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user