Skip to content

Commit 2e87c84

Browse files
chore(internal): codegen related update
1 parent 21809e9 commit 2e87c84

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

hrisdirectory.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ func (r *IndividualsPage) GetNextPage() (res *IndividualsPage, err error) {
120120
}
121121
cfg := r.cfg.Clone(r.cfg.Context)
122122

123-
next := r.Paging.Offset
123+
offset := r.Paging.Offset
124+
length := int64(len(r.Individuals))
125+
next := offset + length
124126

125127
if next < r.Paging.Count && next != 0 {
126128
err = cfg.Apply(option.WithQuery("offset", strconv.FormatInt(next, 10)))

packages/pagination/pagination.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,9 @@ func (r *Page[T]) GetNextPage() (res *Page[T], err error) {
241241
}
242242
cfg := r.cfg.Clone(r.cfg.Context)
243243

244-
next := r.Paging.Offset
244+
offset := r.Paging.Offset
245+
length := int64(len(r.Data))
246+
next := offset + length
245247

246248
if next < r.Paging.Count && next != 0 {
247249
err = cfg.Apply(option.WithQuery("offset", strconv.FormatInt(next, 10)))

0 commit comments

Comments
 (0)