Skip to content

Commit

Permalink
fix: 중복 퀴즈 제출 제한 (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
violet-mj authored Aug 23, 2024
1 parent 623f3d5 commit f69dbf6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ public QuizFirstComeSubmitResponseDto quizSubmit(QuizFirstComeSubmitRequest quiz
return QuizFirstComeSubmitResponseDto.notCorrect();
}

if(eventUserRepository.findByUserIdAndSubEventId(authenticatedUser.getId(), subEventId).isPresent()) {
return QuizFirstComeSubmitResponseDto.alreadyParticipant();
}

EventUser newEventUser = EventUser.builder()
.user(authenticatedUser)
.subEvent(subEvent)
Expand Down

0 comments on commit f69dbf6

Please sign in to comment.