Updates to handle maps above 1000 locations
This commit is contained in:
parent
94600839f0
commit
a96318f19e
@ -12,9 +12,15 @@ const {
|
|||||||
class LocationsController {
|
class LocationsController {
|
||||||
async getAll(req, res) {
|
async getAll(req, res) {
|
||||||
try {
|
try {
|
||||||
const { limit = 1000, offset = 0, where } = req.query;
|
const { limit, offset = 0, where } = req.query;
|
||||||
|
|
||||||
|
const params = { offset };
|
||||||
|
|
||||||
|
// Only add limit if explicitly provided in query
|
||||||
|
if (limit !== undefined) {
|
||||||
|
params.limit = limit;
|
||||||
|
}
|
||||||
|
|
||||||
const params = { limit, offset };
|
|
||||||
if (where) params.where = where;
|
if (where) params.where = where;
|
||||||
|
|
||||||
logger.info('Fetching locations from NocoDB');
|
logger.info('Fetching locations from NocoDB');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user