From b7dacd026af4a98358cfd02ee7fd905508117f32 Mon Sep 17 00:00:00 2001 From: Matt Gleich Date: Sun, 1 Dec 2024 18:49:12 -0500 Subject: [PATCH] fix: do not uses url.JoinPath for strava api Signed-off-by: Matt Gleich --- internal/apis/strava/api.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/internal/apis/strava/api.go b/internal/apis/strava/api.go index 0ebd44a..4f23f26 100644 --- a/internal/apis/strava/api.go +++ b/internal/apis/strava/api.go @@ -2,7 +2,6 @@ package strava import ( "net/http" - "net/url" "github.com/gleich/lcp-v2/internal/apis" "github.com/gleich/lumber/v3" @@ -10,13 +9,8 @@ import ( func sendStravaAPIRequest[T any](path string, tokens tokens) (T, error) { var zeroValue T - u, err := url.JoinPath("https://www.strava.com/", path) - if err != nil { - lumber.Error(err, "failed to join URL") - return zeroValue, err - } - req, err := http.NewRequest("GET", u, nil) + req, err := http.NewRequest("GET", "https://www.strava.com/"+path, nil) if err != nil { lumber.Error(err, "failed to create request") return zeroValue, err