@cocreate/crud-server 1.15.2 → 1.15.4
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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/index.js +0 -2
- package/src/mongodb/mongodb.js +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.15.4](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.15.3...v1.15.4) (2022-12-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* opertor throwing a regex error ([6683f40](https://github.com/CoCreate-app/CoCreate-crud-server/commit/6683f4012353f81614a97ad997e622f985613f5a))
|
|
7
|
+
|
|
8
|
+
## [1.15.3](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.15.2...v1.15.3) (2022-12-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* readDocument doc._id.toString() ([ab22fea](https://github.com/CoCreate-app/CoCreate-crud-server/commit/ab22fea26e94282190800f1c0484faadef9ffdb9))
|
|
14
|
+
|
|
1
15
|
## [1.15.2](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.15.1...v1.15.2) (2022-12-04)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -98,8 +98,6 @@ class CoCreateCrudServer {
|
|
|
98
98
|
data['organization_id'] = process.env.organization_id
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
console.log('crud-server-----', data['organization_id'], data.collection, data.database)
|
|
102
|
-
|
|
103
101
|
if (!data.db || !data.db.length)
|
|
104
102
|
data.db = this.dbs
|
|
105
103
|
let dbsLength = data.db.length
|
package/src/mongodb/mongodb.js
CHANGED
|
@@ -405,6 +405,7 @@ function document(action, data){
|
|
|
405
405
|
doc.db = 'mongodb'
|
|
406
406
|
doc.database = database
|
|
407
407
|
doc.collection = collection
|
|
408
|
+
doc._id = doc._id.toString()
|
|
408
409
|
documents.push(doc)
|
|
409
410
|
}
|
|
410
411
|
}
|
|
@@ -701,12 +702,12 @@ function createQuery(filters) {
|
|
|
701
702
|
query[key][item.operator] = item.value;
|
|
702
703
|
break;
|
|
703
704
|
case '$in':
|
|
704
|
-
var in_values = [];
|
|
705
|
-
item.value.forEach(function(v) {
|
|
706
|
-
|
|
707
|
-
});
|
|
705
|
+
// var in_values = [];
|
|
706
|
+
// item.value.forEach(function(v) {
|
|
707
|
+
// in_values.push(new RegExp(".*" + v + ".*", "i"));
|
|
708
|
+
// });
|
|
708
709
|
|
|
709
|
-
query[key] = {$in :
|
|
710
|
+
query[key] = {$in : item.value }
|
|
710
711
|
break;
|
|
711
712
|
case '$nin':
|
|
712
713
|
query[key][item.operator] = item.value;
|