From a2a94c7c09aa1379e23ec12f2d53d864202d07be Mon Sep 17 00:00:00 2001 From: Max Vorobev Date: Thu, 14 Sep 2023 17:31:36 +0300 Subject: [PATCH] Fix obtaining token and fetching billing metrics --- pkg/selapi/billing.go | 2 +- pkg/selapi/tokens.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/selapi/billing.go b/pkg/selapi/billing.go index fd0c5db..5cee28f 100644 --- a/pkg/selapi/billing.go +++ b/pkg/selapi/billing.go @@ -52,7 +52,7 @@ type BalanceResponse struct { func FetchBalance(token string) (*BalanceResponse, error) { client := &http.Client{} - req, err := http.NewRequest("GET", "https://my.selectel.ru/api/v3/billing/balance", nil) + req, err := http.NewRequest("GET", "https://api.selectel.ru/v3/billing/balance", nil) if err != nil { return nil, err } diff --git a/pkg/selapi/tokens.go b/pkg/selapi/tokens.go index 5e1928d..d75ace5 100644 --- a/pkg/selapi/tokens.go +++ b/pkg/selapi/tokens.go @@ -33,7 +33,7 @@ func ObtainToken(token, projectId string) (*TokensResponse, error) { client := &http.Client{} req, err := http.NewRequest( "POST", - "https://my.selectel.ru/api/vpc/resell/v2/tokens", + "https://api.selectel.ru/vpc/resell/v2/tokens", bytes.NewBuffer(buf)) if err != nil { return nil, err