public bool CancelAmendment(string id) { var amendment = GetAmendment(id); _cache.Remove(string.Format(GetAmendmentKeyFormat, CheckingWindow, amendment.Urn)); return(_amendmentService.CancelAmendment(id)); }
public IActionResult Cancel(string id) { if (_amendmentService.CancelAmendment(id)) { return(RedirectToAction("Index")); } return(RedirectToAction("Error", "Home")); }
public IActionResult Delete([FromRoute][SwaggerParameter("The id of the amendment to cancel", Required = true)] string id, [FromRoute] [SwaggerParameter("The checking window to request amendments from", Required = false)] CheckingWindow checkingWindow) { var result = _amendmentService.CancelAmendment(id); var response = new GetResponse <bool> { Result = result, Error = new Error() }; return(Ok(response)); }