@xuda.io/account_module 1.2.377 → 1.2.379

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 +7 -7
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1189,7 +1189,7 @@ export const get_contacts = async function (req) {
1189
1189
  }
1190
1190
 
1191
1191
  const contacts = await db_module.find_couch_query('xuda_contacts', opt);
1192
- debugger;
1192
+
1193
1193
  for await (let doc of contacts.docs) {
1194
1194
  if (doc.contact_uid) {
1195
1195
  const account_ret = await get_account_name({ uid_query: doc.contact_uid });
@@ -1200,12 +1200,12 @@ export const get_contacts = async function (req) {
1200
1200
  }
1201
1201
  }
1202
1202
 
1203
- let requests_from_ret = { docs: [] };
1204
- let requests_to_ret = { docs: [] };
1203
+ let requests_from = { docs: [] };
1204
+ let requests_to = { docs: [] };
1205
1205
 
1206
1206
  if (with_requests) {
1207
- 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: ['_id', 'team_req_date', 'team_req_to_email', 'team_req_from_uid'] });
1208
- requests_to_ret = await db_module.find_couch_query('xuda_team', {
1207
+ requests_from = 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: ['_id', 'team_req_date', 'team_req_to_email', 'team_req_from_uid'] });
1208
+ requests_to = await db_module.find_couch_query('xuda_team', {
1209
1209
  selector: { docType: 'team_request', access_type: 'contact', team_req_stat: 2, team_req_to_uid: uid },
1210
1210
  fields: ['_id', 'team_req_date', 'team_req_to_email', 'sender_account_info.email', 'sender_account_info.first_name', 'sender_account_info.last_name', 'sender_account_info.profile_avatar', 'team_req_from_uid'],
1211
1211
  });
@@ -1215,8 +1215,8 @@ export const get_contacts = async function (req) {
1215
1215
  code: 1,
1216
1216
  data: {
1217
1217
  docs: [
1218
- ...requests_from_ret.docs.map((e) => ({ docType: 'contact', date_created: e.team_req_date, email: [e.team_req_to_email], name: '', profile_avatar: _conf.anonymous_image_url, pending: true, uid: e.team_req_from_uid, team_req_id: e._id })),
1219
- ...requests_to_ret.docs.map((e) => ({
1218
+ ...requests_from.docs.map((e) => ({ docType: 'contact', date_created: e.team_req_date, email: [e.team_req_to_email], name: '', profile_avatar: _conf.anonymous_image_url, pending: true, uid: e.team_req_from_uid, team_req_id: e._id })),
1219
+ ...requests_to.docs.map((e) => ({
1220
1220
  docType: 'contact',
1221
1221
  date_created: e.team_req_date,
1222
1222
  email: [e.sender_account_info.email],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.377",
3
+ "version": "1.2.379",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {