public async Task <bool> CancelAppeal(Guid applicationId, string signinId, string userName) { var request = new CancelAppealRequest { UserId = signinId, UserName = userName }; var result = await Post($"/Appeals/{applicationId}/cancel", request); return(result == HttpStatusCode.OK); }
public async Task <IActionResult> CancelAppeal(Guid applicationId, [FromBody] CancelAppealRequest request) { var deletedSuccessfully = await _fileStorageService.DeleteApplicationDirectory(applicationId, ContainerType.Appeals, new CancellationToken()); if (!deletedSuccessfully) { _logger.LogError($"Unable to delete appeal files for application: {applicationId}"); } var command = new CancelAppealCommand { ApplicationId = applicationId, UserId = request.UserId, UserName = request.UserName }; await _mediator.Send(command); return(new OkResult()); }