1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-08-13 20:04:49 +02:00

Allow limit=0 in URL parameters

This commit is contained in:
Ralph Slooten
2025-02-15 15:22:16 +13:00
parent 8878ece19f
commit 703e981a8b

View File

@@ -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
}