@RequestMapping( method = RequestMethod.POST, consumes = "application/json", produces = "application/json") public ResponseEntity createClub(@Valid @RequestBody ClubData clubData) { clubService.createClub(clubData); return new ResponseEntity(HttpStatus.CREATED); }
@RequestMapping(value = "/{acronym}", method = RequestMethod.GET) public ResponseEntity<ClubData> getClub(@PathVariable String acronym) { ClubData club = clubService.getClub(acronym); return new ResponseEntity<>(club, HttpStatus.OK); }
@RequestMapping(method = RequestMethod.PUT) public ResponseEntity updateClub(@Valid @RequestBody ClubData clubData) { clubService.updateClub(clubData); return new ResponseEntity(HttpStatus.OK); }