public IActionResult ViewAmendment(string id) { var amendment = _amendmentService.GetAmendment(id); if (amendment != null) { return(View(new AmendmentViewModel { Amendment = amendment })); } return(RedirectToAction("Error", "Home")); }
public IActionResult GetAmendment( [FromRoute][SwaggerParameter("The id of the requested amendment", Required = true)] string id, [FromRoute][SwaggerParameter("The checking window to request amendments from", Required = true)] CheckingWindow checkingWindow) { var amendment = _amendmentService.GetAmendment(checkingWindow, id); var response = new GetResponse <Amendment> { Result = amendment, Error = new Error() }; return(Ok(response)); }
public Amendment GetAmendment(string id) { return(_amendmentService.GetAmendment(id)); }