Skip to content
Snippets Groups Projects
Commit 731b8570 authored by Ján Dovjak's avatar Ján Dovjak
Browse files

feat: scheduleGame and dropGame API

parent fb32d977
No related branches found
No related tags found
No related merge requests found
......@@ -63,11 +63,17 @@ public class IceHockeyManagerApi {
return userFacade.getTeamsInLeague();
}
@PostMapping("/team/create") public final void createTeam(@Valid @RequestBody TeamCreateDTO team) {
@PostMapping("/team/create")
public final void createTeam(@Valid @RequestBody TeamCreateDTO team) {
leagueManagerFacade.createNewTeam(team);
}
@PostMapping("/game/create")
public final void scheduleGame(@Valid @RequestBody GameCreateDTO game) {
leagueManagerFacade.scheduleGame(game);
}
@GetMapping("/game/team/{id}")
public final Collection<GameDTO> getGamesForTeam(@PathVariable Long id) {
return userFacade.getGamesForTeam(id);
......@@ -78,5 +84,8 @@ public class IceHockeyManagerApi {
return userFacade.getGamesForLeague();
}
@DeleteMapping("/game/delete/{id}")
public final void dropGame(@PathVariable Long id) {
leagueManagerFacade.dropGame(id);
}
}
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