@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.
Files changed (2) hide show
  1. package/index.mjs +15 -0
  2. 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.239",
3
+ "version": "1.2.241",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {