delete debug endpoint from TeamRestController.java

This commit is contained in:
2025-12-18 15:29:46 +01:00
parent 6a0ccda528
commit b43ef291ee
2 changed files with 0 additions and 24 deletions

View File

@@ -35,18 +35,6 @@ public class TeamRestController {
}
}
@PostMapping("createTeamDebug")
public ResponseEntity<@NonNull TeamWSTO> createTeam(){
Team team = teamService.createTeam();
try {
team.setTeamName("DEBUG");
teamService.updateTeam(team);
return new ResponseEntity<>(TeamWSTO.of(team), HttpStatus.CREATED);
} catch (TeamExistsException e) {
teamService.deleteTeam(team.getId());
return ResponseEntity.of(ProblemDetail.forStatusAndDetail(HttpStatus.CONFLICT,"This team already exists")).build();
}
}
@GetMapping("all")
public ResponseEntity<@NonNull List<TeamWSTO>> getAllTeams(){