Add match counter

This commit is contained in:
2025-08-18 23:27:14 +02:00
parent 3baea70356
commit 36c8f3b22f
8 changed files with 48 additions and 12 deletions

View File

@@ -156,11 +156,12 @@ public class TournamentController {
return ResponseEntity.ok(tournamentMapper.toDto(tournamentPlayService.newRound(tournament, groupId)));
}
@PostMapping("/tournaments/{tournamentId}/matches/{matchId}/start/{court}")
public ResponseEntity<TournamentDto> startMatch(@PathVariable Long tournamentId, @PathVariable Long matchId, @PathVariable Long court) {
@PostMapping("/tournaments/{tournamentId}/matches/{matchId}/start")
public ResponseEntity<TournamentDto> startMatch(@PathVariable Long tournamentId, @PathVariable Long matchId,
@RequestParam("court") Long court, @RequestParam("counter") Long counter) {
var tournament = tournamentService.findTournamentById(tournamentId);
return ResponseEntity.ok(tournamentMapper.toDto(tournamentPlayService.startMatch(tournament, matchId, court)));
return ResponseEntity.ok(tournamentMapper.toDto(tournamentPlayService.startMatch(tournament, matchId, court, counter)));
}
@PostMapping("/tournaments/{tournamentId}/matches/{matchId}/stop")