Skip to content

Commit

Permalink
feat(delegate_service): fix invalid pagination skip number for bucket…
Browse files Browse the repository at this point in the history
… info
  • Loading branch information
hunshenshi committed Aug 6, 2024
1 parent 0459402 commit fa9bb6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apiservice/delegate_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ func (s *DelegateService) BucketInfo(ctx context.Context, req *api.BucketInfoReq
first = page.GetFirst()
}
if skip >= uint64(len(bucketInfo)) {
return nil, errors.New("invalid pagination skip number for bucket info")
bucketInfoList.BucketInfo = make([]*api.BucketInfo, 0)
bucketInfoLists = append(bucketInfoLists, bucketInfoList)
continue
}
if uint64(len(bucketInfo))-skip < first {
first = uint64(len(bucketInfo)) - skip
Expand Down

0 comments on commit fa9bb6e

Please sign in to comment.