@xuda.io/account_module 1.2.858 → 1.2.859
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 +4 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1549,7 +1549,7 @@ const get_user_contact = async function (uid, uid_query) {
|
|
|
1549
1549
|
};
|
|
1550
1550
|
|
|
1551
1551
|
export const get_contacts = async function (req) {
|
|
1552
|
-
const { _id, uid, name, limit, skip, bookmark, search, filter_type = 'all' } = req;
|
|
1552
|
+
const { _id, uid, name, limit, skip, bookmark, search, filter_type = 'all', contact_id } = req;
|
|
1553
1553
|
let { with_requests } = req;
|
|
1554
1554
|
var opt = {
|
|
1555
1555
|
selector: {
|
|
@@ -1579,6 +1579,9 @@ export const get_contacts = async function (req) {
|
|
|
1579
1579
|
if (_id) {
|
|
1580
1580
|
opt.selector._id = _id;
|
|
1581
1581
|
}
|
|
1582
|
+
if (contact_id) {
|
|
1583
|
+
opt.selector._id = contact_id;
|
|
1584
|
+
}
|
|
1582
1585
|
|
|
1583
1586
|
if (typeof name !== 'undefined') {
|
|
1584
1587
|
opt.selector.name = { $regex: `(?i)${name}` };
|