@xuda.io/account_module 1.2.822 → 1.2.824
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 +7 -6
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1520,7 +1520,6 @@ 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;
|
|
1524
1523
|
doc.name = account_info?.account_type === 'business' ? account_info.business_name : `${account_info.first_name} ${account_info.last_name}`;
|
|
1525
1524
|
doc.profile_avatar = account_info.profile_avatar;
|
|
1526
1525
|
doc.profile_picture = account_info.profile_picture;
|
|
@@ -1601,12 +1600,14 @@ export const get_contacts = async function (req) {
|
|
|
1601
1600
|
let shared_from = { docs: [] };
|
|
1602
1601
|
let my_contact = { docs: [] };
|
|
1603
1602
|
if (with_requests) {
|
|
1604
|
-
|
|
1605
|
-
|
|
1603
|
+
if (filter_type === 'pending') {
|
|
1604
|
+
////// TO - OUT
|
|
1605
|
+
requests_to.docs = await get_pending_contact_out(uid);
|
|
1606
1606
|
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1607
|
+
////// FROM - IN
|
|
1608
|
+
requests_from.docs = await get_pending_contact_in(uid);
|
|
1609
|
+
shared_from.docs = await get_pending_share_contact_in(uid);
|
|
1610
|
+
}
|
|
1610
1611
|
// my contact
|
|
1611
1612
|
|
|
1612
1613
|
const my_contact_doc = await get_user_contact(uid, uid);
|