Skip to content

Commit

Permalink
fix: adjust page offset for oathkeeper apis
Browse files Browse the repository at this point in the history
  • Loading branch information
shipperizer committed Apr 8, 2024
1 parent efaf501 commit c78a36b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/rules/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func (a *API) handleList(w http.ResponseWriter, r *http.Request) {

pagination := types.ParsePagination(r.URL.Query())

if pagination.Page < 1 {
pagination.Page = 1
}

rules, err := a.service.ListRules(r.Context(), pagination.Page, pagination.Size)

if err != nil {
Expand Down

0 comments on commit c78a36b

Please sign in to comment.