diff --git a/internal/domain/dtos/certificate.go b/internal/domain/dtos/certificate.go index 8c9e80ae..cf9eb785 100644 --- a/internal/domain/dtos/certificate.go +++ b/internal/domain/dtos/certificate.go @@ -5,11 +5,6 @@ type CertificateArchiveFileReq struct { Format string `json:"format"` } -type CertificateArchiveFileResp struct { - Certificate string `json:"certificate"` - PrivateKey string `json:"privateKey"` -} - type CertificateValidateCertificateReq struct { Certificate string `json:"certificate"` } diff --git a/internal/rest/handlers/certificate.go b/internal/rest/handlers/certificate.go index 62c4df53..ded0db94 100644 --- a/internal/rest/handlers/certificate.go +++ b/internal/rest/handlers/certificate.go @@ -26,12 +26,12 @@ func NewCertificateHandler(router *router.RouterGroup[*core.RequestEvent], servi } group := router.Group("/certificates") - group.POST("/{certificateId}/archive", handler.archive) + group.POST("/{certificateId}/archive", handler.archiveFile) group.POST("/validate/certificate", handler.validateCertificate) group.POST("/validate/private-key", handler.validatePrivateKey) } -func (handler *CertificateHandler) archive(e *core.RequestEvent) error { +func (handler *CertificateHandler) archiveFile(e *core.RequestEvent) error { req := &dtos.CertificateArchiveFileReq{} req.CertificateId = e.Request.PathValue("certificateId") if err := e.BindBody(req); err != nil { @@ -50,6 +50,7 @@ func (handler *CertificateHandler) validateCertificate(e *core.RequestEvent) err if err := e.BindBody(req); err != nil { return resp.Err(e, err) } + if rs, err := handler.service.ValidateCertificate(e.Request.Context(), req); err != nil { return resp.Err(e, err) } else { @@ -62,6 +63,7 @@ func (handler *CertificateHandler) validatePrivateKey(e *core.RequestEvent) erro if err := e.BindBody(req); err != nil { return resp.Err(e, err) } + if err := handler.service.ValidatePrivateKey(e.Request.Context(), req); err != nil { return resp.Err(e, err) } else { diff --git a/ui/src/components/workflow/node/UploadNodeConfigForm.tsx b/ui/src/components/workflow/node/UploadNodeConfigForm.tsx index 62d60569..bc354eb4 100644 --- a/ui/src/components/workflow/node/UploadNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/UploadNodeConfigForm.tsx @@ -52,9 +52,6 @@ const UploadNodeConfigForm = forwardRef) => { onValuesChange?.(values as UploadNodeConfigFormFieldValues); }; @@ -144,12 +141,7 @@ const UploadNodeConfigForm = forwardRef - + @@ -159,12 +151,7 @@ const UploadNodeConfigForm = forwardRef - +