Skip to content

Commit

Permalink
Update Business Logic.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
GowthamanT authored Oct 29, 2020
1 parent 4e84d62 commit f45cb64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Business Logic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return themeParkRideRepository.save(themeParkRide);
}

@PostMapping(value = "/ride/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
public ThemeParkRide postRide(@PathVariable long id){
return themeParkRideRepository.findById(id).orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, String.format("Invalid ride id %s", id)));
}
@DeleteMapping(value = "/ride/{id}")
public void deleteRide(@PathVariable long id){
themeParkRideRepository.deleteById(id);
}

0 comments on commit f45cb64

Please sign in to comment.