π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
APIClient: Pass host as parameter
Neeraj Gupta181056d8c5c5
diff --git a/internal/api/client.go b/internal/api/client.goindex 2424e21000..6d5c952bab 100644--- a/internal/api/client.go+++ b/internal/api/client.go@@ -7,8 +7,9 @@ import ()const (- TokenHeader = "X-Auth-Token"- TokenQuery = "token"+ EnteAPIEndpoint = "https://api.ente.io"+ TokenHeader = "X-Auth-Token"+ TokenQuery = "token")var (@@ -23,6 +24,7 @@ type Client struct {type Params struct {Debug boolTrace bool+ Host string}func NewClient(p Params) *Client {@@ -42,7 +44,11 @@ func NewClient(p Params) *Client {})}c.SetError(&Error{})- c.SetBaseURL("https://api.ente.io")+ if p.Host != "" {+ c.SetBaseURL(p.Host)+ } else {+ c.SetBaseURL(EnteAPIEndpoint)+ }return &Client{restClient: c,}