@xuda.io/ai_module 1.1.3755 → 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.
Files changed (2) hide show
  1. package/index.mjs +18 -17
  2. 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
- let requests_from = { docs: [] };
2813
- if (filter_type === 'pending') {
2814
- 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'] };
2815
- const requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
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
- for await (let e of requests_from_res.docs) {
2818
- //account_info
2819
- let doc = { ts: e.team_req_date, pending: true, properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
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
- if (e.team_req_from_uid) {
2822
- doc.user_contact = await account_module.get_user_card(uid, e.team_req_from_uid);
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
- //share_item_id
2826
- const app_id = await account_module.get_account_default_project_id(e.team_req_from_uid);
2827
- const miniapp_ret = await db_module.get_app_couch_doc_native(app_id, e.share_item_id);
2828
- doc.properties.menuName = miniapp_ret.properties.menuName;
2829
- doc.studio_meta.agent_image = miniapp_ret.studio_meta.agent_image;
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
- requests_from.docs.push(doc);
2832
+ requests_from.docs.push(doc);
2833
+ }
2832
2834
  }
2833
2835
  }
2834
-
2835
2836
  //////////////
2836
2837
 
2837
2838
  let docs = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.3755",
3
+ "version": "1.1.3756",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",