mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-04-26 15:25:17 +08:00
优化代码/创建服务的时候可以保存SSL证书信息
This commit is contained in:
@@ -17,7 +17,7 @@ func (this *DeleteAction) RunPost(params struct {
|
||||
defer this.CreateLog(oplogs.LevelInfo, "删除SSL证书 %d", params.CertId)
|
||||
|
||||
// 是否正在被使用
|
||||
countResp, err := this.RPC().ServerRPC().CountAllEnabledServersWithSSLCertId(this.AdminContext(), &pb.CountAllEnabledServersWithSSLCertIdRequest{CertId: params.CertId})
|
||||
countResp, err := this.RPC().ServerRPC().CountAllEnabledServersWithSSLCertId(this.AdminContext(), &pb.CountAllEnabledServersWithSSLCertIdRequest{SslCertId: params.CertId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
@@ -26,7 +26,7 @@ func (this *DeleteAction) RunPost(params struct {
|
||||
this.Fail("此证书正在被某些服务引用,请先修改服务后再删除。")
|
||||
}
|
||||
|
||||
_, err = this.RPC().SSLCertRPC().DeleteSSLCert(this.AdminContext(), &pb.DeleteSSLCertRequest{CertId: params.CertId})
|
||||
_, err = this.RPC().SSLCertRPC().DeleteSSLCert(this.AdminContext(), &pb.DeleteSSLCertRequest{SslCertId: params.CertId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user