feat(blackjack): add hit endpoint for blackjack game (CAS-51) #97

Merged
jank merged 5 commits from add-hitting into main 2025-03-27 12:52:42 +00:00
Showing only changes of commit 59562e5b64 - Show all commits

View file

@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
@Slf4j
@ -35,7 +36,7 @@ public class BlackJackGameController {
UserEntity user = optionalUser.get();
BlackJackGameEntity game = blackJackService.getBlackJackGame(id);
if (game == null) {
if (game == null || !Objects.equals(game.getUserId(), user.getId())) {
return ResponseEntity.notFound().build();
}