Skip to content

Commit fe62e36

Browse files
Merge pull request #188 from jaqx0r/renovate/github.com-jaqx0r-pagination-0.x
fix(deps): update module github.com/jaqx0r/pagination to v0.0.2
2 parents e2b0e4d + 7ed40fc commit fe62e36

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.26.2
55
require (
66
github.com/gin-gonic/gin v1.12.0
77
github.com/google/uuid v1.6.0
8-
github.com/jaqx0r/pagination v0.0.1
8+
github.com/jaqx0r/pagination v0.0.2
99
github.com/oapi-codegen/runtime v1.4.0
1010
)
1111

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
8080
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
8181
github.com/jaqx0r/itestcontainer v0.0.3 h1:3MJ7mONs+w8f/iTf2ePZu6fQkAwz2uycY7nEe2iPvSE=
8282
github.com/jaqx0r/itestcontainer v0.0.3/go.mod h1:aByboqFJsT1uLdUvEZjE7PcVUfqiVu5lZS2dtKEMm/k=
83-
github.com/jaqx0r/pagination v0.0.1 h1:Crli2x2PzHAJXJw2fgB1iGUwDJ2vx+tZMUOHAcz5ACo=
84-
github.com/jaqx0r/pagination v0.0.1/go.mod h1:XbnJhWMTxgzqzqYKweAz43LR3NWo6KoxIMsRDeycSFM=
83+
github.com/jaqx0r/pagination v0.0.2 h1:/ylyk4Tts1HZuESjbpCl/uv9om0/wfh4wp5M8hSE6Nw=
84+
github.com/jaqx0r/pagination v0.0.2/go.mod h1:XbnJhWMTxgzqzqYKweAz43LR3NWo6KoxIMsRDeycSFM=
8585
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
8686
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
8787
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=

server/apiservice/thing.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ func (ApiService) ListThings(ctx context.Context, req ListThingsRequestObject) (
2121
paramSig.Write([]byte(req.Params.Filter))
2222
nonce := paramSig.Sum(nil)
2323

24-
offset, err := pagination.Decode(req.Params.PageToken, nonce)
24+
offset, err := pagination.Decode[int](req.Params.PageToken, nonce)
2525

2626
log.Printf("query for offset: %d and limit %d", offset, req.Params.PageSize)
2727

28-
token, err := pagination.Encode(offset, req.Params.PageSize, nonce)
28+
token, err := pagination.Encode(offset+req.Params.PageSize, nonce)
2929
if err != nil {
3030
return nil, err
3131
}

0 commit comments

Comments
 (0)