@xuda.io/ai_module 1.1.3608 → 1.1.3609
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 +14 -13
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2692,23 +2692,24 @@ export const get_apps = async function (req, job_id, headers) {
|
|
|
2692
2692
|
///////////////
|
|
2693
2693
|
////// FROM - IN
|
|
2694
2694
|
let requests_from = { docs: [] };
|
|
2695
|
+
if (filter_type === 'pending') {
|
|
2696
|
+
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'] };
|
|
2697
|
+
const requests_from_res = await db_module.find_couch_query('xuda_team', from_opt);
|
|
2695
2698
|
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
for await (let e of requests_from_res.docs) {
|
|
2700
|
-
//account_info
|
|
2699
|
+
for await (let e of requests_from_res.docs) {
|
|
2700
|
+
//account_info
|
|
2701
2701
|
|
|
2702
|
-
|
|
2702
|
+
let doc = { ts: e.team_req_date, pending: true, properties: {}, studio_meta: { createdByUid: e.team_req_from_uid }, team_req_id: e._id };
|
|
2703
2703
|
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2704
|
+
if (e.team_req_from_uid) {
|
|
2705
|
+
// const account_info_ret = await account_module.get_account_name({ uid_query: e.team_req_from_uid });
|
|
2706
|
+
// if (account_info_ret.code < 0) {
|
|
2707
|
+
// continue; // throw new Error(`account ${contact_uid} not found`);
|
|
2708
|
+
// }
|
|
2709
2709
|
|
|
2710
|
-
|
|
2711
|
-
|
|
2710
|
+
// doc.account_info = account_info_ret.data;
|
|
2711
|
+
doc.user_contact = await account_module.get_user_card(uid, e.team_req_from_uid);
|
|
2712
|
+
}
|
|
2712
2713
|
}
|
|
2713
2714
|
|
|
2714
2715
|
//share_item_id
|