Skip to content

Commit

Permalink
Merge branch 'DB-revision' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
rcMarty committed Feb 7, 2024
2 parents e0c356b + 04e93b3 commit ee8c57e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public ResponseEntity<RestPaginatedResult<Location>> getLocations(
}

@GetMapping("/locations/{id}")
public ResponseEntity<LocationDTO> getLocationById(@PathVariable int id) {
public ResponseEntity<Location> getLocationById(@PathVariable int id) {
LocationDTO locationDTO = locationRepo
.findById(id)
.orElseThrow(() -> RestException.of(HttpStatus.NOT_FOUND, "Location with id '%d' not found!", id));

return new ResponseEntity<>(locationDTO, HttpStatus.OK);
return new ResponseEntity<>(Location.fromDTO(locationDTO), HttpStatus.OK);
}

@GetMapping("/locations/{locationId}/parts/{partId}")
Expand Down

0 comments on commit ee8c57e

Please sign in to comment.