Skip to content

Commit

Permalink
add asset to body
Browse files Browse the repository at this point in the history
  • Loading branch information
hknots committed Aug 2, 2024
1 parent 05b4727 commit bb91c60
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public ResponseEntity<Asset> 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")
Expand Down

0 comments on commit bb91c60

Please sign in to comment.