mirror of
https://github.com/PaulReichmuth/timekeep-backend.git
synced 2026-02-06 04:53:25 +00:00
delete debug endpoint from TeamRestController.java
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user