Skip to content

Commit

Permalink
Use default value for number perPage
Browse files Browse the repository at this point in the history
  • Loading branch information
matty271828 committed Oct 31, 2023
1 parent 65b9c8b commit fd67839
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/api/pagination.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func GetPaginated[DataSchema ~[]T, T any](ctx context.Context, client *Client, t
var (
responses DataSchema
page = 1
perPage = 10
)

type overlay struct {
Expand All @@ -69,7 +68,7 @@ func GetPaginated[DataSchema ~[]T, T any](ctx context.Context, client *Client, t

for {
// add pagination parameters to url
pageParams := fmt.Sprintf("?page=%d&perPage=%d", page, perPage)
pageParams := fmt.Sprintf("?page=%d", page)

response, err := client.Execute(
url+pageParams,
Expand Down

0 comments on commit fd67839

Please sign in to comment.