This commit is contained in:
Fu Diwei
2024-10-19 10:02:31 +08:00
parent 4382474449
commit 6225969d4c
9 changed files with 38 additions and 31 deletions

View File

@@ -7,13 +7,10 @@ import (
"fmt"
"net/http"
"certimate/internal/domain"
xhttp "certimate/internal/utils/http"
)
type WebhookAccess struct {
Url string `json:"url"`
}
type WebhookDeployer struct {
option *DeployerOption
infos []string
@@ -42,7 +39,7 @@ type webhookData struct {
}
func (d *WebhookDeployer) Deploy(ctx context.Context) error {
access := &WebhookAccess{}
access := &domain.WebhookAccess{}
if err := json.Unmarshal([]byte(d.option.Access), access); err != nil {
return fmt.Errorf("failed to parse hook access config: %w", err)
}