@xuda.io/account_module 1.2.239 → 1.2.241
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 +15 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1122,6 +1122,21 @@ export const get_contacts = async function (req) {
|
|
|
1122
1122
|
opt.selector.name = { $regex: `(?i)${name}` };
|
|
1123
1123
|
}
|
|
1124
1124
|
|
|
1125
|
+
if (typeof search !== 'undefined') {
|
|
1126
|
+
opt.selector['$or'] = [
|
|
1127
|
+
{
|
|
1128
|
+
name: {
|
|
1129
|
+
$regex: `${req.log_search}`,
|
|
1130
|
+
},
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
email: {
|
|
1134
|
+
$regex: `(?i)${req.log_search}`,
|
|
1135
|
+
},
|
|
1136
|
+
},
|
|
1137
|
+
];
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1125
1140
|
if (skip) {
|
|
1126
1141
|
opt.skip = skip;
|
|
1127
1142
|
}
|