public async Task <ResultModel> DeleteNamespaceAsync([Required(ErrorMessage = "唯一标识不能为空")] Guid id) { await _configCenterHubContext.Clients.All.DeleteNamespace(id); await _namespaceService.DeleteNamespaceAsync(id); return(ResultModel.Success("删除成功")); }
public async Task <ResultModel> DeleteNamespace(Guid id) { try { string token = GetToken(); await namespaceService.DeleteNamespaceAsync(id); _configServerService.DeleteNamespace(id, token); return(ResultModel.Success("删除成功")); } catch (AspectInvocationException ex) { return(ResultModel.Fail(ex.InnerException?.Message)); } catch (MateralConfigCenterException ex) { return(ResultModel.Fail(ex.Message)); } }