From fa9bb6ea5b55894bc1968a249d07505ddab9b8e8 Mon Sep 17 00:00:00 2001 From: hunshenshi <289517357@qq.com> Date: Tue, 6 Aug 2024 17:51:07 +0800 Subject: [PATCH] feat(delegate_service): fix invalid pagination skip number for bucket info --- apiservice/delegate_service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apiservice/delegate_service.go b/apiservice/delegate_service.go index 4563641..b5b1cbd 100644 --- a/apiservice/delegate_service.go +++ b/apiservice/delegate_service.go @@ -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