WIP: substitutions
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good

This commit is contained in:
2025-09-10 10:35:41 +02:00
parent 2cc188540b
commit d7dee35d6e
3 changed files with 36 additions and 1 deletions

View File

@@ -195,4 +195,11 @@ 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) {
var tournament = tournamentService.findTournamentById(tournamentId);
return ResponseEntity.ok(tournamentMapper.toDto(tournamentPlayService.substitutePlayer(tournament, playerId, substituteId)));
}
}