@xuda.io/account_module 1.2.859 → 1.2.861
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 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1550,6 +1550,12 @@ 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 data = await db_module.get_couch_doc('xuda_contacts', _id);
|
|
1556
|
+
return data;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1553
1559
|
let { with_requests } = req;
|
|
1554
1560
|
var opt = {
|
|
1555
1561
|
selector: {
|
|
@@ -1579,6 +1585,7 @@ export const get_contacts = async function (req) {
|
|
|
1579
1585
|
if (_id) {
|
|
1580
1586
|
opt.selector._id = _id;
|
|
1581
1587
|
}
|
|
1588
|
+
|
|
1582
1589
|
if (contact_id) {
|
|
1583
1590
|
opt.selector._id = contact_id;
|
|
1584
1591
|
}
|