浏览代码

Merge branch 'master' of github.com:knadh/listmonk

Kailash Nadh 5 年之前
父节点
当前提交
1064f1e4d8
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      README.md
  2. 2 2
      handlers.go

+ 1 - 1
README.md

@@ -37,7 +37,7 @@ Alternatively, to run a demo of listmonk, you can quickly spin up a container `d
 - Fast bulk subscriber import
 - Fast bulk subscriber import
 - Custom subscriber attributes
 - Custom subscriber attributes
 - Subscriber querying and segmentation with ad-hoc SQL
 - Subscriber querying and segmentation with ad-hoc SQL
-- Rich Go templates and WYSIWYG editor
+- Rich Go HTML templates and WYSIWYG editor
 - Media gallery
 - Media gallery
 - Multi-threaded multi-SMTP e-mail queues for fast campaign delivery
 - Multi-threaded multi-SMTP e-mail queues for fast campaign delivery
 - HTTP/JSON APIs for everything
 - HTTP/JSON APIs for everything

+ 2 - 2
handlers.go

@@ -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 {
-			perPage = defaultPerPage
+		if ppi > 0 && ppi <= maxPerPage {
+			perPage = ppi
 		}
 		}
 	}
 	}