Skip to content
Snippets Groups Projects
Commit 92877877 authored by Häderle Marius's avatar Häderle Marius
Browse files

08.01.2024 - added method updateTeamName to Service #24

parents ac41eb7e aedebba2
No related branches found
No related tags found
1 merge request!7Dev in Main Merge
......@@ -208,13 +208,27 @@ public class TournamentService {
return teamId;
}
public Tournament getTournament(UUID tournamentId) throws TournamentIdNotFoundException {
Tournament tournament = tournamentRepository.findById(tournamentId)
.orElseThrow(() -> new TournamentIdNotFoundException(tournamentId));
log.debug(tournament + "is found");
return tournament;
}
public void deleteTournament(UUID tournamentId) throws TournamentIdNotFoundException {
Tournament tournamentToDelete = tournamentRepository.findById(tournamentId)
.orElseThrow(() -> new TournamentIdNotFoundException(tournamentId));
tournamentRepository.delete(tournamentToDelete);
log.debug("Tournament " + tournamentId + " has been deleted");
}
/*
Weitere Methoden:
UpdateTeamScore Marius
Tunier beenden
GetTournament Leon
DeleteTournament Leon
User
User Mattis
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment