@xuda.io/ai_module 1.1.3927 → 1.1.3929
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 +3 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2797,7 +2797,7 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2797
2797
|
|
|
2798
2798
|
let user_apps = { docs: [], total_docs: 0 };
|
|
2799
2799
|
if (filter_type !== 'pending') {
|
|
2800
|
-
if (!limit ||
|
|
2800
|
+
if (!limit || mini_app_id) {
|
|
2801
2801
|
user_apps = await db_module.find_app_couch_query(app_id, opt);
|
|
2802
2802
|
} else {
|
|
2803
2803
|
delete opt.sort;
|
|
@@ -2806,7 +2806,7 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2806
2806
|
opt.fields = ['_id'];
|
|
2807
2807
|
|
|
2808
2808
|
const counter = await db_module.find_app_couch_query(app_id, opt);
|
|
2809
|
-
|
|
2809
|
+
user_apps.total_docs = counter.docs.length;
|
|
2810
2810
|
}
|
|
2811
2811
|
}
|
|
2812
2812
|
|
|
@@ -2854,7 +2854,7 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2854
2854
|
docs.push(doc);
|
|
2855
2855
|
}
|
|
2856
2856
|
|
|
2857
|
-
return { code: 2, data: { docs: [...requests_from.docs, ...docs] } };
|
|
2857
|
+
return { code: 2, data: { docs: [...requests_from.docs, ...docs], total_docs: user_apps.total_docs + requests_from.total_docs.length } };
|
|
2858
2858
|
} catch (err) {
|
|
2859
2859
|
return { code: -11, data: err.message };
|
|
2860
2860
|
}
|