Increase maximum page size to 500

One hundred is a sensible limit, but five hundred gives us a lot more head room. The entities are only small after all.
This commit is contained in:
Tom Coupland
2020-03-30 12:00:02 +01:00
committed by GitHub
parent d55e01ab7d
commit 2086154de1

View File

@@ -1052,8 +1052,8 @@ func pageParams(c *gin.Context) (cursor string, perPage int) {
cursor = c.Query("cursor")
perPage, _ = strconv.Atoi(c.Query("per_page"))
if perPage > 100 {
perPage = 100
if perPage > 500 {
perPage = 500
} else if perPage <= 0 {
perPage = 30
}