Merge pull request #796 from bigsk05/main
fixed 1panel system ssl deploy
This commit is contained in:
@@ -7,7 +7,13 @@ import (
|
||||
|
||||
func (c *Client) UpdateSystemSSL(req *UpdateSystemSSLRequest) (*UpdateSystemSSLResponse, error) {
|
||||
resp := &UpdateSystemSSLResponse{}
|
||||
err := c.sendRequestWithResult(http.MethodPost, "/settings/ssl/update", req, resp)
|
||||
|
||||
path := "/settings/ssl/update"
|
||||
if c.version == "v2" {
|
||||
path = "/core" + path
|
||||
}
|
||||
|
||||
err := c.sendRequestWithResult(http.MethodPost, path, req, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ import (
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
client *resty.Client
|
||||
client *resty.Client
|
||||
version string
|
||||
}
|
||||
|
||||
func NewClient(serverUrl, apiVersion, apiKey string) *Client {
|
||||
@@ -36,7 +37,8 @@ func NewClient(serverUrl, apiVersion, apiKey string) *Client {
|
||||
})
|
||||
|
||||
return &Client{
|
||||
client: client,
|
||||
client: client,
|
||||
version: apiVersion,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user