Skip to content

Commit c46e955

Browse files
committed
remove forced limit of 20 on getAll* methods
1 parent ad8e492 commit c46e955

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/controllers/search.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ router.get("/getAllForType", async function getAllForType(req, res) {
2626
let page = Math.max(parseInt(req.query.page || 1), 1);
2727
let offset = 0;
2828
let response_limit = Number.MAX_SAFE_INTEGER;
29-
if (
29+
if (!req.query.response_limit) {
30+
// do nothing, return everything
31+
} else if (
3032
req.query.response_limit &&
3133
req.query.response_limit.toLowerCase() === "none"
3234
) {
@@ -42,7 +44,7 @@ router.get("/getAllForType", async function getAllForType(req, res) {
4244
}
4345
const titlelist = await db.any(TITLES_FOR_THINGS, {
4446
language: as.value(req.query.language || "en"),
45-
limit: RESPONSE_LIMIT,
47+
limit: response_limit,
4648
offset: offset,
4749
type: objType
4850
});

0 commit comments

Comments
 (0)