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:
@@ -57,7 +57,7 @@ func getStartLimit(req *http.Request) (start int, beforeTS int64, limit int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
l := req.URL.Query().Get("limit")
|
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
|
limit = n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user