WIP: substitutions
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user