[Route("kernel/delete")] // diag public async Task <ApiResult> DeleteKernel([FromBody] string kernelId) { try { RolesCheck.EnsureWriter(Request); InteractiveQueryManager iqm = new InteractiveQueryManager(_logger); return(await iqm.DeleteKernel(kernelId).ConfigureAwait(false)); } catch (Exception e) { _logger.LogError(e, e.Message); return(ApiResult.CreateError(e.Message)); } }
[Route("kernel/delete")] // diag public async Task <ApiResult> DeleteKernel([FromBody] JObject jObject) { try { RolesCheck.EnsureWriter(Request); var diag = jObject.ToObject <InteractiveQueryObject>(); InteractiveQueryManager iqm = new InteractiveQueryManager(_logger, _configuration); return(await iqm.DeleteKernel(diag.KernelId, diag.Name).ConfigureAwait(false)); } catch (Exception e) { _logger.LogError(e, e.Message); return(ApiResult.CreateError(e.Message)); } }