Skip to content

Commit

Permalink
Merge pull request #5 from zaphiro-technologies/fix-wrong-index
Browse files Browse the repository at this point in the history
fix starting page index
  • Loading branch information
arslanbekov authored Apr 23, 2024
2 parents 1c26a1f + ad59aff commit b5985f3
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cloudconnexa/connectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (c *ConnectorsService) GetByPage(page int, pageSize int) (ConnectorPageResp

func (c *ConnectorsService) List() ([]Connector, error) {
var allConnectors []Connector
page := 1
page := 0
pageSize := 10

for {
Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/dns_records.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *DNSRecordsService) GetByPage(page int, pageSize int) (DnsRecordPageResp

func (c *DNSRecordsService) GetDnsRecord(recordId string) (*DnsRecord, error) {
pageSize := 10
page := 1
page := 0

for {
response, err := c.GetByPage(page, pageSize)
Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (c *HostsService) GetHostsByPage(page int, size int) (HostPageResponse, err
func (c *HostsService) List() ([]Host, error) {
var allHosts []Host
pageSize := 10
page := 1
page := 0

for {
response, err := c.GetHostsByPage(page, pageSize)
Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/ip_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (c *IPServicesService) GetIPByPage(page int, pageSize int) (IPServicePageRe

func (c *IPServicesService) List() ([]IPService, error) {
var allIPServices []IPService
page := 1
page := 0
pageSize := 10

for {
Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (c *NetworksService) GetByPage(page int, size int) (NetworkPageResponse, er
func (c *NetworksService) List() ([]Network, error) {
var allNetworks []Network
pageSize := 10
page := 1
page := 0

for {
response, err := c.GetByPage(page, pageSize)
Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (c *RoutesService) GetByPage(networkId string, page int, size int) (RoutePa
func (c *RoutesService) List(networkId string) ([]Route, error) {
var allRoutes []Route
pageSize := 10
page := 1
page := 0

for {
response, err := c.GetByPage(networkId, page, pageSize)
Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/user_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (c *UserGroupsService) GetByPage(page int, pageSize int) (UserGroupPageResp
func (c *UserGroupsService) List() ([]UserGroup, error) {
var allUserGroups []UserGroup
pageSize := 10
page := 1
page := 0

for {
response, err := c.GetByPage(page, pageSize)
Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (c *UsersService) GetByPage(page int, pageSize int) (UserPageResponse, erro

func (c *UsersService) List(username string, role string) (*User, error) {
pageSize := 10
page := 1
page := 0

for {
response, err := c.GetByPage(page, pageSize)
Expand Down

0 comments on commit b5985f3

Please sign in to comment.