- add cursor-based pagination to getListAgentsByAccess and update handler

- add index on updatedAt and _id in agent schema for improved query performance
This commit is contained in:
Atef Bellaaj 2025-06-12 17:17:25 +02:00 committed by Danny Avila
parent e97444a863
commit 25b97ba388
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
3 changed files with 81 additions and 34 deletions

View file

@ -395,9 +395,9 @@ const getListAgentsHandler = async (req, res) => {
// Use the new ACL-aware function
const data = await getListAgentsByAccess({
userId,
accessibleIds,
otherParams: {}, // Can add query params here if needed
});
return res.json(data);