fix goatcounter base URL construction
1 file changed, 2 insertions(+), 5 deletions(-)
M internal/stats/goatcounter/count.go → internal/stats/goatcounter/count.go
@@ -6,7 +6,6 @@ "context" "encoding/json" "io" "net/http" - "strings" "time" "gitlab.com/tozd/go/errors"@@ -14,7 +13,7 @@ "go.alanpearce.eu/homestead/internal/config" "go.alanpearce.eu/x/log" ) -const timeout = 1 * time.Second +const timeout = 5 * time.Second type Options struct { URL *config.URL@@ -48,9 +47,7 @@ } func New(options *Options) *Goatcounter { baseURL := options.URL - if strings.HasSuffix(baseURL.Path, "/count") { - baseURL.Path = "/api/v0/" - } + baseURL.Path = "/api/v0/" return &Goatcounter{ log: options.Logger,