@cocreate/crud-server 1.13.5 → 1.13.6
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 +2 -2
- package/src/index.js +1 -1
- package/src/mongodb/mongodb.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.13.6](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.13.5...v1.13.6) (2022-11-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bumped [@cocreate](https://github.com/cocreate) dependencies ([073a756](https://github.com/CoCreate-app/CoCreate-crud-server/commit/073a75625acc077a62581b4462f36364a00bde42))
|
|
7
|
+
|
|
1
8
|
## [1.13.5](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.13.4...v1.13.5) (2022-11-22)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/crud-server",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.6",
|
|
4
4
|
"description": "CoCreate-crud-server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cocreate-crud",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://cocreate.app/docs/CoCreate-crud-server",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cocreate/docs": "^1.4.
|
|
43
|
+
"@cocreate/docs": "^1.4.2",
|
|
44
44
|
"csvtojson": "^2.0.10",
|
|
45
45
|
"json-2-csv": "^3.10.3",
|
|
46
46
|
"mongodb": "^4.4.0"
|
package/src/index.js
CHANGED
package/src/mongodb/mongodb.js
CHANGED
|
@@ -566,11 +566,11 @@ function createUpdate(data, type) {
|
|
|
566
566
|
})
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
-
if( data['deleteName'] ) {
|
|
569
|
+
if ( data['deleteName'] ) {
|
|
570
570
|
update['$unset'] = replaceArray(data['deleteName']);
|
|
571
571
|
}
|
|
572
572
|
|
|
573
|
-
if( data['updateName'] ) {
|
|
573
|
+
if ( data['updateName'] ) {
|
|
574
574
|
update['$rename'] = replaceArray(data['updateName'])
|
|
575
575
|
for (const [key, value] of Object.entries(update['$rename'])) {
|
|
576
576
|
if (/\.([0-9]*)/g.test(key) || /\[([0-9]*)\]/g.test(value)) {
|
|
@@ -711,7 +711,7 @@ function createQuery(filters) {
|
|
|
711
711
|
|
|
712
712
|
function valueTypes(data) {
|
|
713
713
|
let object = {}
|
|
714
|
-
if( typeof data === 'object' ) {
|
|
714
|
+
if ( typeof data === 'object' ) {
|
|
715
715
|
// update['$set'] = {}
|
|
716
716
|
for (const [key, value] of Object.entries(data)) {
|
|
717
717
|
let val;
|
|
@@ -748,7 +748,7 @@ function errorHandler(data, error, database, collection){
|
|
|
748
748
|
error['database'] = database
|
|
749
749
|
if (collection)
|
|
750
750
|
error['collection'] = collection
|
|
751
|
-
if(data.error)
|
|
751
|
+
if (data.error)
|
|
752
752
|
data.error.push(error)
|
|
753
753
|
else
|
|
754
754
|
data.error = [error]
|