@xuda.io/account_module 1.2.289 → 1.2.291
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 +4 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1163,11 +1163,13 @@ export const get_contacts = async function (req) {
|
|
|
1163
1163
|
debugger;
|
|
1164
1164
|
const contacts_ret = await db_module.find_couch_query('xuda_contacts', opt);
|
|
1165
1165
|
let requests_from_ret = { docs: [] };
|
|
1166
|
+
let requests_to_ret = { docs: [] };
|
|
1166
1167
|
if (with_requests) {
|
|
1167
|
-
requests_from_ret = await db_module.find_couch_query('xuda_team', { selector: { docType: 'team_request', access_type: 'contact', team_req_stat: 2, team_req_from_uid: uid } });
|
|
1168
|
+
requests_from_ret = await db_module.find_couch_query('xuda_team', { selector: { docType: 'team_request', access_type: 'contact', team_req_stat: 2, team_req_from_uid: uid }, fields: ['team_req_to_email'] });
|
|
1169
|
+
requests_to_ret = await db_module.find_couch_query('xuda_team', { selector: { docType: 'team_request', access_type: 'contact', team_req_stat: 2, team_req_to_uid: uid }, fields: ['sender_account_info.email', 'sender_account_info.first_name', 'sender_account_info.last_name'] });
|
|
1168
1170
|
}
|
|
1169
1171
|
|
|
1170
|
-
return { code: 1, data: { docs: [...requests_from_ret.docs, ...contacts_ret.docs] } };
|
|
1172
|
+
return { code: 1, data: { docs: [...requests_from_ret.docs, ...requests_to_ret.docs, ...contacts_ret.docs] } };
|
|
1171
1173
|
};
|
|
1172
1174
|
|
|
1173
1175
|
export const delete_contact = async function (req) {
|