@cocreate/crud-server 1.29.1 → 1.30.1
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 +20 -0
- package/package.json +3 -3
- package/src/index.js +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [1.30.1](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.30.0...v1.30.1) (2023-11-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* prevent syncing of organization users with platform ([b0e43b9](https://github.com/CoCreate-app/CoCreate-crud-server/commit/b0e43b9df2e408674a1ffd7c0ad455a0464fc489))
|
|
7
|
+
|
|
8
|
+
# [1.30.0](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.29.1...v1.30.0) (2023-11-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* bump dependencies for latest features ([4a787c6](https://github.com/CoCreate-app/CoCreate-crud-server/commit/4a787c6045b2a6e27f79bdeca52ec42fc275ccfa))
|
|
14
|
+
* set $filter.index ([414946f](https://github.com/CoCreate-app/CoCreate-crud-server/commit/414946fbb1528b65017dae5eb5e00b99c742f10a))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* set starting index ([3fca777](https://github.com/CoCreate-app/CoCreate-crud-server/commit/3fca7775e2351d84b831f416bd2c361338e5b08c))
|
|
20
|
+
|
|
1
21
|
## [1.29.1](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.29.0...v1.29.1) (2023-11-09)
|
|
2
22
|
|
|
3
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/crud-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.1",
|
|
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/config": "^1.6.
|
|
44
|
-
"@cocreate/utils": "^1.
|
|
43
|
+
"@cocreate/config": "^1.6.8",
|
|
44
|
+
"@cocreate/utils": "^1.27.1",
|
|
45
45
|
"csvtojson": "^2.0.10",
|
|
46
46
|
"json-2-csv": "^3.10.3"
|
|
47
47
|
}
|
package/src/index.js
CHANGED
|
@@ -94,8 +94,8 @@ class CoCreateCrudServer {
|
|
|
94
94
|
if (data.method === 'object.update' && data.organization_id !== this.config.organization_id) {
|
|
95
95
|
let syncKeys
|
|
96
96
|
if (data.array === 'organizations')
|
|
97
|
-
syncKeys = ['name', 'logo', '
|
|
98
|
-
else if (data.array === '
|
|
97
|
+
syncKeys = ['name', 'logo', 'storage', 'host']
|
|
98
|
+
else if (data.array === 'userssss')
|
|
99
99
|
syncKeys = ['name', 'email', 'password', 'avatar']
|
|
100
100
|
|
|
101
101
|
if (syncKeys && syncKeys.length) {
|
|
@@ -110,7 +110,7 @@ class CoCreateCrudServer {
|
|
|
110
110
|
if (object) {
|
|
111
111
|
for (let key of syncKeys) {
|
|
112
112
|
if (object[key])
|
|
113
|
-
|
|
113
|
+
platformUpdate.object[0][key] = object[key]
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -143,8 +143,10 @@ class CoCreateCrudServer {
|
|
|
143
143
|
let type = data.method.split(".")[0]
|
|
144
144
|
if (data.$filter.sort && data.$filter.sort.length)
|
|
145
145
|
data[type] = sortData(data[type], data.$filter.sort)
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
if (!data.$filter.index)
|
|
147
|
+
data.$filter.index = 0
|
|
148
|
+
data.$filter.startingIndex = data.$filter.index
|
|
149
|
+
data.$filter.index += data[type].length
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
}
|