-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix: add pagination for teams api #983
Conversation
client/environment.go
Outdated
@@ -233,24 +233,20 @@ type EnvironmentDeployResponse struct { | |||
Id string `json:"id"` | |||
} | |||
|
|||
func (Environment) getEndpoint() string { |
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.
not needed... I do it in a different way.
client/pagination.go
Outdated
@@ -29,7 +24,7 @@ func (p *Pagination) next(currentPageSize int) bool { | |||
} | |||
|
|||
// params - additional params. may be nil. | |||
func getAll[P Paginated](client *ApiClient, params map[string]string) ([]P, error) { | |||
func getAll[P any](client *ApiClient, endpoint string, params map[string]string) ([]P, error) { |
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.
modified to support all types.
c1f4247
to
4ddf679
Compare
f691769
to
4599af4
Compare
/review |
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.
NIce 👍🏼
Issue & Steps to Reproduce / Feature Request
fixes #981
Solution
Added pagination for teams() api call.
Minor updates to code to add the pagination.
Updated unit tests.