public async Task <IActionResult> Cancel(Guid requestId, CancelSupportRequestViewModel vm) { if (!ModelState.IsValid) { return(RedirectToAction("Index", new { requestId, vm.ReturnAction, vm.ReturnController })); } if (!vm.ConfirmedCancel.Value) { return(RedirectToAction(vm.ReturnAction, vm.ReturnController, new { requestId = requestId })); } await _mediator.Send(new CancelSupportRequestCommand(requestId)); return(RedirectToAction("Index", "Home")); }
public IActionResult Index(Guid requestId, string returnAction, string returnController) { var vm = new CancelSupportRequestViewModel(requestId, returnAction, returnController); return(View("~/Views/RequestSupport/CancelRequest.cshtml", vm)); }