mirror of
https://github.com/knadh/listmonk.git
synced 2025-01-11 00:38:31 +08:00
Fix: perPage logic in getPagination
This commit is contained in:
parent
3cba2fea51
commit
f6878130a5
1 changed files with 2 additions and 2 deletions
|
@ -186,8 +186,8 @@ func getPagination(q url.Values) pagination {
|
||||||
perPage = 0
|
perPage = 0
|
||||||
} else {
|
} else {
|
||||||
ppi, _ := strconv.Atoi(pp)
|
ppi, _ := strconv.Atoi(pp)
|
||||||
if ppi < 1 || ppi > maxPerPage {
|
if ppi > 0 && ppi <= maxPerPage {
|
||||||
perPage = defaultPerPage
|
perPage = ppi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue