From 6be1db104aa06e7dd9d71040a96b2c74fd8719fd Mon Sep 17 00:00:00 2001 From: kgc91747 Date: Fri, 9 Aug 2024 17:11:43 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20quiz=20=EB=B9=88=20=ED=80=B4=EC=A6=88?= =?UTF-8?q?=EC=85=8B=20=EB=93=B1=EB=A1=9D=20=EC=9A=94=EC=B2=AD=EC=8B=9C=20?= =?UTF-8?q?=EA=B1=B0=EC=A0=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/edufocus/edufocus/quiz/controller/QuizController.java | 4 ++++ backend/src/main/resources/application.properties | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 c95b595..b1e3fe5 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 @@ -34,6 +34,10 @@ public class QuizController { , @RequestPart(value = "images", required = false) List images) throws IOException { long userId = Long.parseLong(jwtUtil.getUserId(accessToken)); + if (quizSetCreateRequest.getQuizzes().isEmpty()) { + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + } + QuizSet quizSet = quizSetService.createQuizSet(userId, quizSetCreateRequest.getTitle()); int imageIdx = 0; diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index dd85ef5..943e868 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -21,7 +21,7 @@ spring.datasource.username=${USER_NAME} spring.datasource.password=${USER_PASSWORD} spring.mvc.pathmatch.matching-strategy=ant_path_matcher spring.jpa.database=mysql -spring.jpa.hibernate.ddl-auto=create +spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true spring.jpa.properties.hibernate.jdbc.time_zone=Asia/Seoul management.endpoints.web.exposure.include=health,info