From ea3a18291927cca64efa1a5cc69f51f6a7ebdbd9 Mon Sep 17 00:00:00 2001 From: zhangchenhao Date: Tue, 13 May 2025 10:48:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D1panel=E7=BD=91=E7=AB=99?= =?UTF-8?q?=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/cert/deploy/1panel.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/internal/cert/deploy/1panel.go b/backend/internal/cert/deploy/1panel.go index 0acd122..19f9b43 100644 --- a/backend/internal/cert/deploy/1panel.go +++ b/backend/internal/cert/deploy/1panel.go @@ -95,7 +95,7 @@ func Request1panel(data *map[string]any, method, providerID, requestUrl string) return nil, fmt.Errorf("证书部署失败") } if code != 200 { - msg, ok := res["msg"].(string) + msg, ok := res["message"].(string) if !ok { return nil, fmt.Errorf("证书部署失败") } @@ -184,7 +184,7 @@ func Deploy1panelSite(cfg map[string]any) error { if !ok { return fmt.Errorf("获取网站参数失败: data") } - SSLProtocol, ok := siteData["SSLProtocol"].(string) + SSLProtocol, ok := siteData["SSLProtocol"].([]any) if !ok { return fmt.Errorf("获取网站参数失败: data.SSLProtocol") } @@ -216,10 +216,10 @@ func Deploy1panelSite(cfg map[string]any) error { "enable": enable, "hsts": hsts, "httpConfig": httpConfig, - // "importType": "paste", - "type": "manual", - "websiteId": websiteId, + "importType": "paste", + "type": "manual", + "websiteId": websiteId, } _, err = Request1panel(&data, "POST", providerID, fmt.Sprintf("api/v1/websites/%s/https", siteId)) - return nil + return err }