Skip to content
Snippets Groups Projects
Commit aedebba2 authored by Seidel Leon's avatar Seidel Leon
Browse files

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

parents 00e956bd 9f143387
No related branches found
No related tags found
1 merge request!7Dev in Main Merge
......@@ -2,6 +2,7 @@ package hdm.mi.sthbackend.model;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
......@@ -14,7 +15,7 @@ import java.util.UUID;
public class Team {
@Id
private final UUID id;
private final String teamName;
@Setter
private String teamName;
private final List<UUID> teamMembers;
}
......@@ -195,7 +195,17 @@ public class TournamentService {
}
match.getTeamScores().put(teamId, newScore);
tournamentRepository.save(tournament);
log.debug("Score von Team " + teamId + " auf " + newScore + " geupdatet");
log.debug("Score of Team " + teamId + " updated to " + newScore);
}
public UUID updateTeamName(UUID teamId, String newTeamName) throws TeamIdNotFoundException {
Team team = teamRepository.findById(teamId)
.orElseThrow(() -> new TeamIdNotFoundException(teamId));
team.setTeamName(newTeamName);
teamRepository.save(team);
log.debug("Teamname of " + teamId + " updated to " + newTeamName);
return teamId;
}
public Tournament getTournament(UUID tournamentId) throws TournamentIdNotFoundException {
......
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