From 9483b28c0af76e8d721a38af5b12a9aac8cc4bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Thallis?= Date: Thu, 27 Jun 2024 08:22:49 -0300 Subject: [PATCH] Fix url to get api --- cmd/download_test.go | 2 +- cmd/submit_test.go | 2 +- config/config.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/download_test.go b/cmd/download_test.go index d95729719..639962b63 100644 --- a/cmd/download_test.go +++ b/cmd/download_test.go @@ -26,7 +26,7 @@ func TestDownloadWithoutToken(t *testing.T) { if assert.Error(t, err) { assert.Regexp(t, "Welcome to Exercism", err.Error()) // It uses the default base API url to infer the host - assert.Regexp(t, "exercism.io/my/settings", err.Error()) + assert.Regexp(t, "exercism.io/settings/api_cli", err.Error()) } } diff --git a/cmd/submit_test.go b/cmd/submit_test.go index 2a12d0bca..e08ce1672 100644 --- a/cmd/submit_test.go +++ b/cmd/submit_test.go @@ -28,7 +28,7 @@ func TestSubmitWithoutToken(t *testing.T) { err := runSubmit(cfg, pflag.NewFlagSet("fake", pflag.PanicOnError), []string{}) if assert.Error(t, err) { assert.Regexp(t, "Welcome to Exercism", err.Error()) - assert.Regexp(t, "exercism.io/my/settings", err.Error()) + assert.Regexp(t, "exercism.io/settings/api", err.Error()) } } diff --git a/config/config.go b/config/config.go index b9b1883ba..3d24dcd89 100644 --- a/config/config.go +++ b/config/config.go @@ -130,5 +130,5 @@ func InferSiteURL(apiURL string) string { // SettingsURL provides a link to where the user can find their API token. func SettingsURL(apiURL string) string { - return fmt.Sprintf("%s%s", InferSiteURL(apiURL), "/my/settings") + return fmt.Sprintf("%s%s", InferSiteURL(apiURL), "/settings/api_cli") }