Skip to content

Commit

Permalink
fix: 중복 코드 삭제
Browse files Browse the repository at this point in the history
k000927 committed Aug 14, 2024
1 parent e6ee9e8 commit 3d50fc6
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -328,20 +328,6 @@ public AdminRushEventOptionResponseDto getRushEventOptions(Long rushEventId) {
);
}

@Transactional
public ResponseDto deleteRushEvent(Long rushEventId){
RushEvent rushEvent = rushEventRepository.findById(rushEventId).orElseThrow(() -> new CustomException(CustomErrorCode.NO_RUSH_EVENT));

LocalDateTime now = LocalDateTime.now();
LocalDateTime startDateTime = rushEvent.getStartDateTime();
LocalDateTime endDateTime = rushEvent.getEndDateTime();

if(now.isAfter(startDateTime) && now.isBefore(endDateTime))
throw new CustomException(CustomErrorCode.EVENT_IN_PROGRESS_CANNOT_DELETE);
rushEventRepository.delete(rushEvent);
return ResponseDto.of("요청에 성공하였습니다.");
}

public List<LotteryEventExpectationResponseDto> getLotteryEventExpectations(Long participantId) {
LotteryParticipants lotteryParticipant = lotteryParticipantsRepository.findById(participantId).orElseThrow(
() -> new CustomException(CustomErrorCode.USER_NOT_FOUND)

0 comments on commit 3d50fc6

Please sign in to comment.