From 4cd713f580927f0d54f869645538c6b449b4ad5f Mon Sep 17 00:00:00 2001 From: kgc91747 Date: Mon, 12 Aug 2024 15:26:04 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20lecture,=20quiz=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20=EB=AF=B8=ED=8F=AC=ED=95=A8=20=EB=93=B1=EB=A1=9D=20?= =?UTF-8?q?=EB=B6=88=EA=B0=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edufocus/lecture/controller/LectureController.java | 2 +- .../com/edufocus/edufocus/quiz/controller/QuizController.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/com/edufocus/edufocus/lecture/controller/LectureController.java b/backend/src/main/java/com/edufocus/edufocus/lecture/controller/LectureController.java index dfe142c..3b15967 100644 --- a/backend/src/main/java/com/edufocus/edufocus/lecture/controller/LectureController.java +++ b/backend/src/main/java/com/edufocus/edufocus/lecture/controller/LectureController.java @@ -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); } diff --git a/backend/src/main/java/com/edufocus/edufocus/quiz/controller/QuizController.java b/backend/src/main/java/com/edufocus/edufocus/quiz/controller/QuizController.java index 4a874c9..c9b2dbb 100644 --- a/backend/src/main/java/com/edufocus/edufocus/quiz/controller/QuizController.java +++ b/backend/src/main/java/com/edufocus/edufocus/quiz/controller/QuizController.java @@ -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); } }