Skip to content

Commit

Permalink
Allow limit=0 in URL parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
axllent committed Feb 15, 2025
1 parent 8878ece commit 703e981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/apiv1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func getStartLimit(req *http.Request) (start int, beforeTS int64, limit int) {
}

l := req.URL.Query().Get("limit")
if n, err := strconv.Atoi(l); err == nil && n > 0 {
if n, err := strconv.Atoi(l); err == nil && n > -1 {
limit = n
}

Expand Down

0 comments on commit 703e981

Please sign in to comment.