diff --git a/map/Instuctions.md b/map/Instuctions.md index 36dd0e0..c8666a2 100644 --- a/map/Instuctions.md +++ b/map/Instuctions.md @@ -36,6 +36,7 @@ Welcome to the Map project! This application is a canvassing tool for political - **Error handling.** Always provide user feedback for errors (both backend and frontend). - **Environment variables.** Use `.env` for secrets/config, never hardcode sensitive data. - **Testing.** Test new features locally and ensure they do not break existing functionality. +- **Pagination** Use pagination for API endpoints returning large datasets to avoid performance issues. For example, getAll should be getAllPaginated ## How to Add a Feature diff --git a/map/app/controllers/cutsController.js b/map/app/controllers/cutsController.js index 64f434a..117d548 100644 --- a/map/app/controllers/cutsController.js +++ b/map/app/controllers/cutsController.js @@ -313,8 +313,8 @@ class CutsController { logger.info(`Fetching public cuts from table ID: ${config.nocodb.cutsSheetId}`); - // Use the same pattern as getAll method that's known to work - const response = await nocodbService.getAll( + // Use getAllPaginated to get ALL cuts, not just first page + const response = await nocodbService.getAllPaginated( config.nocodb.cutsSheetId ); diff --git a/map/app/public/admin.html b/map/app/public/admin.html index 89cf465..d636959 100644 --- a/map/app/public/admin.html +++ b/map/app/public/admin.html @@ -625,18 +625,42 @@ - -
-
-

All Users

- -
- -

Loading users...

+ +
+
+

All Users

+
+
+ +
+ +
+ +
+
+ + +
+ +
+ + +
+