Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix `per_page=all` not working on GET bounces API. Closes #2678.

Kailash Nadh60c069d73da6
diff --git a/queries.sql b/queries.sql
index c503075c..685491b6 100644
--- a/queries.sql
+++ b/queries.sql
@@ -1101,7 +1101,7 @@ WHERE ($1 = 0 OR bounces.id = $1)
AND ($2 = 0 OR bounces.campaign_id = $2)
AND ($3 = 0 OR bounces.subscriber_id = $3)
AND ($4 = '' OR bounces.source = $4)
-ORDER BY %order% OFFSET $5 LIMIT $6;
+ORDER BY %order% OFFSET $5 LIMIT (CASE WHEN $6 < 1 THEN NULL ELSE $6 END);
-- name: delete-bounces
DELETE FROM bounces WHERE $2 = TRUE OR id = ANY($1);