|
@@ -38,7 +38,9 @@ func (s *CertificateServer) CreateCertificate(ctx context.Context, requestCloudf
|
|
|
createCertificate, err := api.CreateSSL(ctxAPI, id, zoneCustomSSL)
|
|
|
|
|
|
if err != nil {
|
|
|
- return nil, err
|
|
|
+ return &cert.CreateCertificateReplyCloudflare{
|
|
|
+ Success: false,
|
|
|
+ }, err
|
|
|
}
|
|
|
return &cert.CreateCertificateReplyCloudflare{
|
|
|
Success: true,
|
|
@@ -62,7 +64,9 @@ func (s *CertificateServer) DeleteCertificate(ctx context.Context, requestCloudf
|
|
|
}
|
|
|
err = api.DeleteSSL(ctxAPI, id, requestCloudflare.GetCertificateId())
|
|
|
if err != nil {
|
|
|
- return nil, err
|
|
|
+ return &cert.DeleteCertificateReplyCloudflare{
|
|
|
+ Success: false,
|
|
|
+ }, err
|
|
|
}
|
|
|
return &cert.DeleteCertificateReplyCloudflare{
|
|
|
Success: true,
|
|
@@ -95,11 +99,12 @@ func (s *CertificateServer) EditCertificate(ctx context.Context, requestCloudfla
|
|
|
zoneCustomSSL.Type = "sni_custom"
|
|
|
editCertificate, err := api.UpdateSSL(ctxAPI, id, requestCloudflare.GetCertificateId(), zoneCustomSSL)
|
|
|
if err != nil {
|
|
|
- return nil, err
|
|
|
+ return &cert.EditCertificateReplyCloudflare{
|
|
|
+ Success: true,
|
|
|
+ }, err
|
|
|
}
|
|
|
return &cert.EditCertificateReplyCloudflare{
|
|
|
Success: true,
|
|
|
Id: editCertificate.ID,
|
|
|
}, err
|
|
|
-
|
|
|
}
|