diff --git a/src/main/java/cz/trailsthroughshadows/api/table/schematic/location/LocationController.java b/src/main/java/cz/trailsthroughshadows/api/table/schematic/location/LocationController.java index 13637c9..a49dba7 100644 --- a/src/main/java/cz/trailsthroughshadows/api/table/schematic/location/LocationController.java +++ b/src/main/java/cz/trailsthroughshadows/api/table/schematic/location/LocationController.java @@ -55,12 +55,12 @@ public ResponseEntity> getLocations( } @GetMapping("/locations/{id}") - public ResponseEntity getLocationById(@PathVariable int id) { + public ResponseEntity 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}")