@xuda.io/xuda-dbs-plugin-xuda 1.0.303 → 1.0.304
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/package.json +1 -1
- package/server.js +8 -4
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xuda.io/xuda-dbs-plugin-xuda",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.304",
|
4
4
|
"description": "Xuda Database Socket for Xuda's proprietary structure powered by CouchDB",
|
5
5
|
"scripts": {
|
6
6
|
"pub": "npm version patch --force && npm publish --access public"
|
package/server.js
CHANGED
@@ -372,14 +372,18 @@ const get_opt = function (e, table_obj) {
|
|
372
372
|
replaceRegexOptions(replaceKeysInQuery(JSON.parse(e.filterModelMongo))),
|
373
373
|
];
|
374
374
|
}
|
375
|
-
|
375
|
+
|
376
|
+
const _filterModelUserMongo =
|
377
|
+
typeof e.filterModelUserMongo === "string"
|
378
|
+
? JSON.parse(e.filterModelUserMongo)
|
379
|
+
: e.filterModelUserMongo;
|
380
|
+
|
381
|
+
if (!_.isEmpty(_filterModelUserMongo)) {
|
376
382
|
if (!selector_new["$and"]) {
|
377
383
|
selector_new["$and"] = [];
|
378
384
|
}
|
379
385
|
selector_new["$and"].push(
|
380
|
-
replaceRegexOptions(
|
381
|
-
replaceKeysInQuery(JSON.parse(e.filterModelUserMongo))
|
382
|
-
)
|
386
|
+
replaceRegexOptions(replaceKeysInQuery(_filterModelUserMongo))
|
383
387
|
);
|
384
388
|
}
|
385
389
|
|