feat: implement field endpoints
This commit is contained in:
@@ -92,7 +92,7 @@ func (a *AppsEndpoint) ListAll(ctx context.Context, pagingOpts ...PagingOption)
|
||||
}
|
||||
}
|
||||
|
||||
if page.TotalPages == page.PageNumber {
|
||||
if page.PageNumber >= page.TotalPages {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -156,16 +156,3 @@ func (a *AppsEndpoint) Get(ctx context.Context, id int) (App, error) {
|
||||
|
||||
return app, nil
|
||||
}
|
||||
|
||||
func createPagingRequest(pagingOpts []PagingOption) *PagingRequest {
|
||||
pagingRequest := &PagingRequest{
|
||||
PageNumber: 1,
|
||||
PageSize: 50,
|
||||
}
|
||||
|
||||
for _, opt := range pagingOpts {
|
||||
opt(pagingRequest)
|
||||
}
|
||||
|
||||
return pagingRequest
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user