@cocreate/crud-server 1.14.1 → 1.14.2
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 +7 -0
- package/package.json +3 -3
- package/src/mongodb/mongodb.js +11 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.14.2](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.14.1...v1.14.2) (2022-11-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* improved readDocument filter, bump dependencies ([df58e49](https://github.com/CoCreate-app/CoCreate-crud-server/commit/df58e499709723b44882e7ce67a934c20d833f30))
|
|
7
|
+
|
|
1
8
|
## [1.14.1](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.14.0...v1.14.1) (2022-11-26)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/crud-server",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.2",
|
|
4
4
|
"description": "CoCreate-crud-server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cocreate-crud",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://cocreate.app/docs/CoCreate-crud-server",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cocreate/docs": "^1.4.
|
|
44
|
-
"@cocreate/utils": "^1.12.
|
|
43
|
+
"@cocreate/docs": "^1.4.6",
|
|
44
|
+
"@cocreate/utils": "^1.12.1",
|
|
45
45
|
"csvtojson": "^2.0.10",
|
|
46
46
|
"json-2-csv": "^3.10.3",
|
|
47
47
|
"mongodb": "^4.4.0"
|
package/src/mongodb/mongodb.js
CHANGED
|
@@ -384,13 +384,17 @@ function document(action, data){
|
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
if (result) {
|
|
387
|
-
// ToDo: forEach at cursor
|
|
388
|
-
let
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
387
|
+
// ToDo: forEach at cursor
|
|
388
|
+
for (let doc of result) {
|
|
389
|
+
let isFilter = true
|
|
390
|
+
if (data.filter['search'])
|
|
391
|
+
isFilter = searchData(doc, data.filter['search'])
|
|
392
|
+
if (isFilter) {
|
|
393
|
+
doc.db = 'mongodb'
|
|
394
|
+
doc.database = database
|
|
395
|
+
doc.collection = collection
|
|
396
|
+
documents.push(doc)
|
|
397
|
+
}
|
|
394
398
|
}
|
|
395
399
|
|
|
396
400
|
if (data.returnDocument == false) {
|