feat: quiz 빈 퀴즈셋 등록 요청시 거절 추가

This commit is contained in:
kgc91747 2024-08-09 17:11:43 +09:00
parent 7a1aaf8f80
commit 6be1db104a
2 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,10 @@ public class QuizController {
, @RequestPart(value = "images", required = false) List<MultipartFile> 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;

View File

@ -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