@xuda.io/ai_module 1.1.4106 → 1.1.4108

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 (3) hide show
  1. package/index.mjs +4 -14
  2. package/old.mjs +9 -0
  3. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2807,7 +2807,7 @@ export const get_apps = async function (req, job_id, headers) {
2807
2807
  break;
2808
2808
  }
2809
2809
  case 'shared': {
2810
- // opt.selector['studio_meta.shared_from_uid'] = { $gt: null };
2810
+ opt.selector['studio_meta.shared_from_uid'] = { $gt: null };
2811
2811
  break;
2812
2812
  }
2813
2813
 
@@ -2872,13 +2872,13 @@ export const get_apps = async function (req, job_id, headers) {
2872
2872
 
2873
2873
  let requests_from = { docs: [], total_docs: 0 };
2874
2874
  if (!mini_app_id) {
2875
- if (filter_type !== 'mine') {
2876
- let from_opt = { selector: { docType: 'team_request', access_type: 'miniapp', team_req_stat: filter_type === 'pending' ? 2 : 3, team_req_to_uid: uid }, fields: ['_id', 'team_req_date', 'sender_account_info.email', 'team_req_from_uid', 'share_item_id'] };
2875
+ if (filter_type === 'pending') {
2876
+ 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'] };
2877
2877
  const requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
2878
2878
 
2879
2879
  for await (let e of requests_from_res.docs) {
2880
2880
  //account_info
2881
- let doc = { _id: e.share_item_id, ts: e.team_req_date, pending: filter_type === 'pending', properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
2881
+ let doc = { ts: e.team_req_date, pending: true, properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
2882
2882
 
2883
2883
  if (e.team_req_from_uid) {
2884
2884
  doc.user_contact = await account_module.get_user_card(uid, e.team_req_from_uid);
@@ -2892,16 +2892,6 @@ export const get_apps = async function (req, job_id, headers) {
2892
2892
 
2893
2893
  requests_from.docs.push(doc);
2894
2894
  }
2895
-
2896
- ///////// profile /////////
2897
- from_opt.access_type = 'account_profile';
2898
- from_opt.access_type = 3;
2899
- const profile_requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
2900
- for await (let account_profile of profile_requests_from_res.docs) {
2901
- if (!account_profile.access_view.includes('apps')) continue;
2902
- }
2903
- ///////////////////////////
2904
-
2905
2895
  requests_from.total_docs = requests_from.docs.length;
2906
2896
  }
2907
2897
  }
package/old.mjs CHANGED
@@ -1821,3 +1821,12 @@ export const get_apps = async function (req, job_id, headers) {
1821
1821
  return { code: -11, data: err.message };
1822
1822
  }
1823
1823
  };
1824
+
1825
+ ///////// profile /////////
1826
+ from_opt.access_type = 'account_profile';
1827
+ from_opt.access_type = 3;
1828
+ const profile_requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
1829
+ for await (let account_profile of profile_requests_from_res.docs) {
1830
+ if (!account_profile.access_view.includes('apps')) continue;
1831
+ }
1832
+ ///////////////////////////
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4106",
3
+ "version": "1.1.4108",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",