From d6baccc4c198e7b21de8af7d67d2dbcb8d160cee Mon Sep 17 00:00:00 2001 From: Steppedcrown Date: Sun, 5 May 2024 19:08:37 -0700 Subject: [PATCH] Allowed for an increased limit of results; set default to 20 --- api/utils/responsePipes.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api/utils/responsePipes.js b/api/utils/responsePipes.js index 10e3cad..a18a961 100644 --- a/api/utils/responsePipes.js +++ b/api/utils/responsePipes.js @@ -1,8 +1,13 @@ function parseLimit(limit) { if (limit != null) { var intLimit = parseInt(limit, 10); - if (intLimit > 100) { - return 100; + // Set upper limit to 200 to support current data set + // If intLimit is NaN, return 20 + if (isNaN(intLimit)) { + return 20; + } else if (intLimit > 200) { + // For efficiency, if over 200, implement paging + return 200; } else { return intLimit; }