Skip to content

Commit

Permalink
Refactor to simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Raphael Silva <[email protected]>
  • Loading branch information
rapphil committed Oct 8, 2024
1 parent 5825efd commit b028620
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions web/api/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1483,11 +1483,10 @@ func (api *API) rules(r *http.Request) apiFuncResult {

for _, grp := range ruleGroups {
if paginationRequest != nil && paginationRequest.NextToken != "" && !foundToken {
if paginationRequest.NextToken == getRuleGroupNextToken(grp.File(), grp.Name()) {
foundToken = true
} else {
if paginationRequest.NextToken != getRuleGroupNextToken(grp.File(), grp.Name()) {
continue
}
foundToken = true
}

if len(rgSet) > 0 {
Expand Down

0 comments on commit b028620

Please sign in to comment.