@xuda.io/ai_module 1.1.3754 → 1.1.3756
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 +18 -23
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2809,29 +2809,30 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2809
2809
|
|
|
2810
2810
|
///////////////
|
|
2811
2811
|
////// FROM - IN
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2812
|
+
if (!mini_app_id) {
|
|
2813
|
+
let requests_from = { docs: [] };
|
|
2814
|
+
if (filter_type === 'pending') {
|
|
2815
|
+
const from_opt = { selector: { docType: 'team_request', access_type: 'miniapp', team_req_stat: 2, team_req_to_uid: uid }, fields: ['_id', 'team_req_date', 'sender_account_info.email', 'team_req_from_uid', 'share_item_id'] };
|
|
2816
|
+
const requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
|
|
2816
2817
|
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2818
|
+
for await (let e of requests_from_res.docs) {
|
|
2819
|
+
//account_info
|
|
2820
|
+
let doc = { ts: e.team_req_date, pending: true, properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
|
|
2820
2821
|
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2822
|
+
if (e.team_req_from_uid) {
|
|
2823
|
+
doc.user_contact = await account_module.get_user_card(uid, e.team_req_from_uid);
|
|
2824
|
+
}
|
|
2824
2825
|
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2826
|
+
//share_item_id
|
|
2827
|
+
const app_id = await account_module.get_account_default_project_id(e.team_req_from_uid);
|
|
2828
|
+
const miniapp_ret = await db_module.get_app_couch_doc_native(app_id, e.share_item_id);
|
|
2829
|
+
doc.properties.menuName = miniapp_ret.properties.menuName;
|
|
2830
|
+
doc.studio_meta.agent_image = miniapp_ret.studio_meta.agent_image;
|
|
2830
2831
|
|
|
2831
|
-
|
|
2832
|
+
requests_from.docs.push(doc);
|
|
2833
|
+
}
|
|
2832
2834
|
}
|
|
2833
2835
|
}
|
|
2834
|
-
|
|
2835
2836
|
//////////////
|
|
2836
2837
|
|
|
2837
2838
|
let docs = [];
|
|
@@ -2843,12 +2844,6 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2843
2844
|
doc.reference_doc = reference_doc;
|
|
2844
2845
|
}
|
|
2845
2846
|
|
|
2846
|
-
// if (!doc?.studio_meta?.agent_image?.length && (!doc?.studio_meta?.thumbnail_request_ts || Date.now() - doc?.studio_meta?.thumbnail_request_ts > 120000)) {
|
|
2847
|
-
// if (headers) {
|
|
2848
|
-
// update_thumbnail('mini_app', doc, app_id, uid, job_id, headers);
|
|
2849
|
-
// }
|
|
2850
|
-
// }
|
|
2851
|
-
|
|
2852
2847
|
doc.user_contact = await account_module.get_user_card(uid, doc.studio_meta.createdByUid);
|
|
2853
2848
|
|
|
2854
2849
|
docs.push(doc);
|