@xuda.io/account_module 1.2.886 → 1.2.887
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 +3 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1613,7 +1613,7 @@ export const get_contacts = async function (req) {
|
|
|
1613
1613
|
opt.bookmark = bookmark;
|
|
1614
1614
|
}
|
|
1615
1615
|
|
|
1616
|
-
let contacts = { docs: [] };
|
|
1616
|
+
let contacts = { docs: [], total_docs: 0 };
|
|
1617
1617
|
|
|
1618
1618
|
if (filter_type !== 'pending') {
|
|
1619
1619
|
contacts = await db_module.find_couch_query('xuda_contacts', opt);
|
|
@@ -1634,7 +1634,7 @@ export const get_contacts = async function (req) {
|
|
|
1634
1634
|
let requests_from = { docs: [], total_docs: 0 };
|
|
1635
1635
|
let shared_from = { docs: [], total_docs: 0 };
|
|
1636
1636
|
let my_contact = { docs: [], total_docs: 0 };
|
|
1637
|
-
let contact_docs = { docs: [], total_docs:
|
|
1637
|
+
let contact_docs = { docs: [], total_docs: contacts.total_docs };
|
|
1638
1638
|
for await (let doc of contacts.docs) {
|
|
1639
1639
|
const ret_to = requests_to.docs.find((e) => {
|
|
1640
1640
|
return e.contact_uid === doc.contact_uid;
|
|
@@ -1649,6 +1649,7 @@ export const get_contacts = async function (req) {
|
|
|
1649
1649
|
doc = await get_contact_info(uid, doc);
|
|
1650
1650
|
contact_docs.docs.push(doc);
|
|
1651
1651
|
}
|
|
1652
|
+
requests_from.total_docs = requests_from.docs.length;
|
|
1652
1653
|
|
|
1653
1654
|
if (!contact_id && with_requests) {
|
|
1654
1655
|
if (filter_type === 'pending') {
|