From 9959bdbca0e23e208d51c0e8d9144ebd127e7978 Mon Sep 17 00:00:00 2001 From: "Bae, Jin Hwan" <76583684+bjh3311@users.noreply.github.com> Date: Fri, 23 Aug 2024 11:06:49 +0900 Subject: [PATCH] Hotfix (#33) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * hotfix 수정 * IndexOutOfBounds 에러 찾는중 * isQuizAvailable.get(quizId) -> get(quizId-1) hotfix --- .github/workflows/deploy.yml | 2 +- .../java/newCar/event_page/service/UserServiceImpl.java | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4a07710..8f18975 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: Deploy To EC2 on: push: - branches: [ "main"] + branches: [ "main" , "hotfix"] jobs: deploy: diff --git a/src/main/java/newCar/event_page/service/UserServiceImpl.java b/src/main/java/newCar/event_page/service/UserServiceImpl.java index 06b6d02..d0728eb 100644 --- a/src/main/java/newCar/event_page/service/UserServiceImpl.java +++ b/src/main/java/newCar/event_page/service/UserServiceImpl.java @@ -105,9 +105,8 @@ public ResponseEntity getQuiz(Long quizEventId ) { Quiz todayQuiz = quizRepository.findByPostDate(LocalDate.now(ZoneId.of("Asia/Seoul"))) .orElseThrow(() -> new NoSuchElementException("오늘 날짜에 해당하는 퀴즈 이벤트가 존재하지 않습니다.")); - if(isQuizAvailable.size() int quizId = Integer.parseInt(todayQuiz.getId().toString()); - if(!isQuizAvailable.get(quizId)){ + if(!isQuizAvailable.get(quizId-1)){ map.put("status", UserQuizStatus.END); return; }//이미 마감되어 있다면