@xuda.io/ai_module 1.1.3951 → 1.1.3953
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +8 -8
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2449,15 +2449,15 @@ export const get_ai_agents = async function (req, job_id, headers) {
|
|
|
2449
2449
|
user_agents = await db_module.find_app_couch_query(app_id, opt);
|
|
2450
2450
|
if (!limit || ai_agent_id) {
|
|
2451
2451
|
user_agents.total_docs = user_agents.docs.length;
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
opt.fields = ['_id'];
|
|
2452
|
+
} else {
|
|
2453
|
+
delete opt.sort;
|
|
2454
|
+
delete opt.skip;
|
|
2455
|
+
opt.limit = 9999;
|
|
2456
|
+
opt.fields = ['_id'];
|
|
2458
2457
|
|
|
2459
|
-
|
|
2460
|
-
|
|
2458
|
+
const counter = await db_module.find_app_couch_query(app_id, opt);
|
|
2459
|
+
user_agents.total_docs = counter.docs.length;
|
|
2460
|
+
}
|
|
2461
2461
|
}
|
|
2462
2462
|
|
|
2463
2463
|
////// FROM - IN
|