Skip to content
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

feat: Organization Memberships API #231

Merged
merged 1 commit into from
Feb 8, 2024
Merged

Conversation

gkats
Copy link
Member

@gkats gkats commented Feb 8, 2024

Added support for the Organization Memberships API. Available operations are Create, Update, Delete and List.

Added support for the Organization Memberships API. Available operations
are Create, Update, Delete and List.
@gkats gkats requested a review from a team as a code owner February 8, 2024 13:07
@@ -297,7 +297,7 @@ func setRequestQuery(req *http.Request, params Params) {
paramsQuery := params.ToQuery()
for k, values := range paramsQuery {
for _, v := range values {
q.Set(k, v)
q.Add(k, v)
Copy link
Member Author

@gkats gkats Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@georgepsarakis I think you've voiced a concern about "array" parameters in the query string and how using Set won't work with them.

Your instinct was right. We need to add values and not overwrite them in order to support arrays.

Query: &url.Values{
"limit": []string{"1"},
"offset": []string{"2"},
"role": []string{"admin", "member"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Ah here's a case for an array, right? https://github.com/clerk/clerk-sdk-go/pull/231/files#r1482950532

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants