@xuda.io/account_module 1.2.821 → 1.2.823

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 +8 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1520,6 +1520,7 @@ const get_user_contact = async function (uid, uid_query) {
1520
1520
  const account_info = (await get_account_name({ uid_query })).data;
1521
1521
  let doc = { docType: 'contact', account_type: account_info.account_type, date_created: Date.now(), email: account_info.email, my_contact: uid === uid_query, contact_uid: uid_query, username: account_info.username };
1522
1522
 
1523
+ debugger;
1523
1524
  doc.name = account_info?.account_type === 'business' ? account_info.business_name : `${account_info.first_name} ${account_info.last_name}`;
1524
1525
  doc.profile_avatar = account_info.profile_avatar;
1525
1526
  doc.profile_picture = account_info.profile_picture;
@@ -1600,12 +1601,14 @@ export const get_contacts = async function (req) {
1600
1601
  let shared_from = { docs: [] };
1601
1602
  let my_contact = { docs: [] };
1602
1603
  if (with_requests) {
1603
- ////// TO - OUT
1604
- requests_to.docs = await get_pending_contact_out(uid);
1604
+ if (filter_type === 'pending') {
1605
+ ////// TO - OUT
1606
+ requests_to.docs = await get_pending_contact_out(uid);
1605
1607
 
1606
- ////// FROM - IN
1607
- requests_from.docs = await get_pending_contact_in(uid);
1608
- shared_from.docs = await get_pending_share_contact_in(uid);
1608
+ ////// FROM - IN
1609
+ requests_from.docs = await get_pending_contact_in(uid);
1610
+ shared_from.docs = await get_pending_share_contact_in(uid);
1611
+ }
1609
1612
  // my contact
1610
1613
 
1611
1614
  const my_contact_doc = await get_user_contact(uid, uid);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.821",
3
+ "version": "1.2.823",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {