diff --git a/src/main/java/no/fint/portal/customer/controller/AssetController.java b/src/main/java/no/fint/portal/customer/controller/AssetController.java index 63df26c..61c44f3 100644 --- a/src/main/java/no/fint/portal/customer/controller/AssetController.java +++ b/src/main/java/no/fint/portal/customer/controller/AssetController.java @@ -60,7 +60,9 @@ public ResponseEntity addAsset(@PathVariable String orgName, @RequestBody Asset asset) { Organisation organisation = portalApiService.getOrganisation(orgName); assetService.addSubAsset(asset, organisation); - return ResponseEntity.created(ServletUriComponentsBuilder.fromCurrentRequestUri().scheme(null).pathSegment(asset.getName()).build().toUri()).cacheControl(CacheControl.noStore()).build(); + return ResponseEntity.created( + ServletUriComponentsBuilder.fromCurrentRequestUri().scheme(null).pathSegment(asset.getName()).build().toUri() + ).cacheControl(CacheControl.noStore()).body(asset); } @Operation(summary = "Get Asset by Name")