Skip to content

Commit

Permalink
Merge pull request #245 from ncats/updateSelfUrl
Browse files Browse the repository at this point in the history
update self url
  • Loading branch information
ChemMitch authored Dec 20, 2023
2 parents 9c68529 + 4895f9d commit 0bb97ad
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,11 @@ public ResponseEntity forceFullReindex(@RequestParam(value= "wipeIndex", default

@GetGsrsRestApiMapping(value="/@reindexBulk({id})", apiVersions = 1)
public ResponseEntity bulkReindexStatus(@PathVariable("id") String id, @RequestParam Map<String, String> queryParameters,
HttpServletRequest request){
HttpServletRequest request){

String self_url = StaticContextAccessor.getBean(IxContext.class).getEffectiveAdaptedURI(request).toString();
return Optional.ofNullable(reindexing.get(id)).map(o->{
o.set_self(request.getRequestURL().toString());
o.set_self(self_url);
return new ResponseEntity<>(o, HttpStatus.OK);
})
.map(oo->(ResponseEntity)oo)
Expand Down

0 comments on commit 0bb97ad

Please sign in to comment.