public IActionResult CancelJob(CancelJobModel model) { try { _logger.LogDebug($"Endpoint: \"JobManagement\" Method: \"CancelJob\" Parameters: \"{model}\""); ValidationResult validationResult = new JobManagementValidator(model).Validate(); if (!validationResult.IsValid) { ExceptionHandler.ThrowProperExternalException(new InputValidationException(validationResult.Message)); } return(Ok(_service.CancelJob(model.SubmittedJobInfoId, model.SessionCode))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public async Task <IActionResult> CancelJob(string jobId) { return(await _jobManagementService.CancelJob(jobId, ControllerContext.HttpContext.Request)); }
public async Task <IActionResult> CancelJob(string jobId) => await _jobManagementService.CancelJob(jobId);