-
Notifications
You must be signed in to change notification settings - Fork 26
fix: Retrieve team for api key #1372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4f3edab
to
3a57e6e
Compare
⏱️ Benchmark results
|
} | ||
return teamName, nil | ||
case auth.APIKey: | ||
resp, err := u.apiClient.ListTeamsWithResponse(context.Background(), &cqapi.ListTeamsParams{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of context.Background()
isn't very nice here, but then it's in a constructor (NewUsageClient
) so the constructor would have to get a ctx otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but considered it better than changing the constructor in this case.
Co-authored-by: Herman Schaaf <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [4.18.3](v4.18.2...v4.18.3) (2023-11-17) ### Bug Fixes * Retrieve team for api key ([#1372](#1372)) ([940d87f](940d87f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Retreive the team associated with an API key to allow usage tracking against a team name
fixes: https://github.com/cloudquery/cloudquery-issues/issues/893