Invallers
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good

This commit is contained in:
2025-09-11 23:43:10 +02:00
parent d7dee35d6e
commit da7ea66d3e
10 changed files with 111 additions and 9 deletions

View File

@@ -196,10 +196,10 @@ public class TournamentController {
return ResponseEntity.noContent().build();
}
@PostMapping("/tournaments/{tournamentId}/players/{playerId}/substitute/{substituteId}")
public ResponseEntity<TournamentDto> substitutePlayer(@PathVariable Long tournamentId, @PathVariable Long playerId, @PathVariable Long substituteId) {
@PostMapping("/tournaments/{tournamentId}/players/{playerId}/event/{eventId}/substitute/{substituteId}")
public ResponseEntity<TournamentDto> substitutePlayer(@PathVariable Long tournamentId, @PathVariable Long playerId, @PathVariable Long eventId, @PathVariable Long substituteId) {
var tournament = tournamentService.findTournamentById(tournamentId);
return ResponseEntity.ok(tournamentMapper.toDto(tournamentPlayService.substitutePlayer(tournament, playerId, substituteId)));
return ResponseEntity.ok(tournamentMapper.toDto(tournamentPlayService.substitutePlayer(tournament, eventId, playerId, substituteId)));
}
}