Skip to content

Commit

Permalink
feat: 임시 게임 저장 시 게임 내용이 없는 경우 파일 재배치를 수행하지 않도록 예외처리
Browse files Browse the repository at this point in the history
  • Loading branch information
jschoi-96 committed Dec 10, 2024
1 parent db4ab30 commit e2fe7f0
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ public void createTempGame(CreateTempGameSetRequest request, ApiMember apiMember
Member member = apiMember.toMember(memberRepository);

List<CreateTempGameRequest> tempGames = request.getTempGames();

if (request.getTempGames() == null || request.getTempGames().isEmpty()) {
TempGameSet tempGameSet = request.toEntity(member);
tempGameSetRepository.save(tempGameSet);
return;
}
validateFileIds(tempGames); // 파일이 DB에 존재하는지 검사

List<TempGame> newTempGames = tempGames.stream()
Expand Down

0 comments on commit e2fe7f0

Please sign in to comment.