Skip to content

Commit

Permalink
fix: use global endpoint to retrieve Konnect org info
Browse files Browse the repository at this point in the history
  • Loading branch information
GGabriele committed Feb 10, 2023
1 parent 55721b6 commit c7f142e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Table of Contents

- [v1.18.1](#v1181)
- [v1.18.0](#v1180)
- [v1.17.3](#v1173)
- [v1.17.2](#v1172)
Expand Down Expand Up @@ -52,6 +53,15 @@
- [v0.2.0](#v020)
- [v0.1.0](#v010)

## [v1.18.1]

> Release date: 2023/02/10
### Fix

- Use global endpoint to retrieve Konnect Organization info.
[#844](https://github.com/Kong/deck/pull/844)

## [v1.18.0]

> Release date: 2023/02/09
Expand Down Expand Up @@ -1153,6 +1163,7 @@ No breaking changes have been introduced in this release.

Debut release of decK

[v1.18.1]: https://github.com/kong/deck/compare/v1.18.0...v1.18.1
[v1.18.0]: https://github.com/kong/deck/compare/v1.17.3...v1.18.0
[v1.17.3]: https://github.com/kong/deck/compare/v1.17.2...v1.17.3
[v1.17.2]: https://github.com/kong/deck/compare/v1.17.1...v1.17.2
Expand Down
7 changes: 5 additions & 2 deletions konnect/login_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ func (s *AuthService) LoginV2(ctx context.Context, email,
}

func (s *AuthService) OrgUserInfo(ctx context.Context) (*OrgUserInfo, error) {
method := http.MethodGet
req, err := s.client.NewRequest(method, "/v2/organizations/me", nil, nil)
// replace geo-specific endpoint with global one for retrieving org info
client := *s.client
client.baseURL = strings.Replace(s.client.baseURL, "eu.", "global.", 1)

req, err := client.NewRequest(http.MethodGet, "/v2/organizations/me", nil, nil)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c7f142e

Please sign in to comment.