use of net.ripe.rpki.validator3.api.validationruns.ValidationRunResource in project rpki-validator-3 by RIPE-NCC.
the class TrustAnchorController method validationResults.
@GetMapping(path = "/{id}/validation-run")
public ResponseEntity<ApiResponse<ValidationRunResource>> validationResults(@PathVariable long id, HttpServletResponse response, Locale locale) throws IOException {
TrustAnchor trustAnchor = trustAnchorRepository.get(id);
ValidationRun validationRun = validationRunRepository.findLatestCompletedForTrustAnchor(trustAnchor).orElseThrow(() -> new EmptyResultDataAccessException("latest validation run for trust anchor " + id, 1));
response.sendRedirect(linkTo(methodOn(ValidationRunController.class).get(validationRun.getId(), locale)).toString());
return null;
}
Aggregations