@xuda.io/account_module 1.2.859 → 1.2.860
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 +13 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1550,6 +1550,18 @@ const get_user_contact = async function (uid, uid_query) {
|
|
|
1550
1550
|
|
|
1551
1551
|
export const get_contacts = async function (req) {
|
|
1552
1552
|
const { _id, uid, name, limit, skip, bookmark, search, filter_type = 'all', contact_id } = req;
|
|
1553
|
+
|
|
1554
|
+
// if (_id) {
|
|
1555
|
+
// let doc_ret = await get_ai_doc({ _id, uid });
|
|
1556
|
+
|
|
1557
|
+
// return doc_ret;
|
|
1558
|
+
// }
|
|
1559
|
+
|
|
1560
|
+
if (_id) {
|
|
1561
|
+
let data = await db_module.get_couch_doc('xuda_contacts', _id);
|
|
1562
|
+
return data;
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1553
1565
|
let { with_requests } = req;
|
|
1554
1566
|
var opt = {
|
|
1555
1567
|
selector: {
|
|
@@ -1579,6 +1591,7 @@ export const get_contacts = async function (req) {
|
|
|
1579
1591
|
if (_id) {
|
|
1580
1592
|
opt.selector._id = _id;
|
|
1581
1593
|
}
|
|
1594
|
+
|
|
1582
1595
|
if (contact_id) {
|
|
1583
1596
|
opt.selector._id = contact_id;
|
|
1584
1597
|
}
|