2 Commits

Author SHA1 Message Date
961b90626f set TLS to version 1.2 2026-01-16 02:14:31 +03:00
81fb8c7e7e changed fiscal endpoint 2026-01-14 18:00:15 +03:00

View File

@@ -1,6 +1,10 @@
package api
import "resty.dev/v3"
import (
"crypto/tls"
"resty.dev/v3"
)
type Client struct {
token string
@@ -20,10 +24,16 @@ func NewClient(token string) *Client {
}
func NewDMClient(token, dmURL, device string) *Client {
restyClient := resty.New()
restyClient.SetTLSClientConfig(&tls.Config{
MinVersion: tls.VersionTLS12,
MaxVersion: tls.VersionTLS12,
})
return &Client{
token: token,
device: device,
resty: resty.New(),
resty: restyClient,
apiBaseURL: dmURL,
fiscalEndpoint: "/dm/fiscal",
}