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