Fixed spatial issues with finding map cuts data.

This commit is contained in:
2025-09-10 20:57:07 -06:00
parent ebf9ff23ab
commit 006cbcf9c3
5 changed files with 48 additions and 129 deletions

View File

@@ -383,8 +383,8 @@ class CutsController {
return res.status(404).json({ error: 'Cut not found' });
}
// Get all locations
const locationsResponse = await nocodbService.getAll(config.LOCATIONS_TABLE_ID);
// Get all locations (use paginated to get ALL records, not just first page)
const locationsResponse = await nocodbService.getAllPaginated(config.LOCATIONS_TABLE_ID);
if (!locationsResponse || !locationsResponse.list) {
return res.json({ locations: [], statistics: { total_locations: 0 } });
}
@@ -448,8 +448,8 @@ class CutsController {
return res.status(403).json({ error: 'Export is disabled for this cut' });
}
// Get all locations
const locationsResponse = await nocodbService.getAll(config.LOCATIONS_TABLE_ID);
// Get all locations (use paginated to get ALL records, not just first page)
const locationsResponse = await nocodbService.getAllPaginated(config.LOCATIONS_TABLE_ID);
if (!locationsResponse || !locationsResponse.list) {
return res.json({ locations: [] });
}
@@ -586,8 +586,8 @@ class CutsController {
return res.status(404).json({ error: 'Cut not found' });
}
// Get all locations
const locationsResponse = await nocodbService.getAll(config.LOCATIONS_TABLE_ID);
// Get all locations (use paginated to get ALL records, not just first page)
const locationsResponse = await nocodbService.getAllPaginated(config.LOCATIONS_TABLE_ID);
if (!locationsResponse || !locationsResponse.list) {
return res.json({
statistics: { total_locations: 0 },