Skip to content
Snippets Groups Projects
Commit e5796e73 authored by Schneider Stefan's avatar Schneider Stefan
Browse files

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	sth-backend/src/main/java/hdm/mi/sthbackend/service/TournamentService.java
parents b4b1f27e aedebba2
No related branches found
No related tags found
1 merge request!7Dev in Main Merge
......@@ -217,6 +217,22 @@ public class TournamentService {
log.debug("Tournament Name for TournamentID " + tournamentId + " updated to " + newTournamentName);
return tournamentId;
}
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
......
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