@cocreate/crud-server 1.20.2 → 1.20.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/CoCreate.config.js +1 -1
- package/docs/index.html +1 -1
- package/package.json +1 -1
- package/src/index.js +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.20.4](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.20.3...v1.20.4) (2023-05-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* apikey renamed to key ([7132442](https://github.com/CoCreate-app/CoCreate-crud-server/commit/71324420f4708f1c8ec03b64e6286deb34238cf8))
|
|
7
|
+
|
|
8
|
+
## [1.20.3](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.20.2...v1.20.3) (2023-05-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* return resolve ([eafc5e5](https://github.com/CoCreate-app/CoCreate-crud-server/commit/eafc5e59c59e3a3835a85b6e46a164f11fc6a80b))
|
|
14
|
+
|
|
1
15
|
## [1.20.2](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.20.1...v1.20.2) (2023-05-07)
|
|
2
16
|
|
|
3
17
|
|
package/CoCreate.config.js
CHANGED
package/docs/index.html
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -98,11 +98,11 @@ class CoCreateCrudServer {
|
|
|
98
98
|
return new Promise(async (resolve) => {
|
|
99
99
|
try {
|
|
100
100
|
if (!data.organization_id)
|
|
101
|
-
resolve()
|
|
101
|
+
return resolve()
|
|
102
102
|
|
|
103
103
|
let dbUrl = this.databaseUrls.get(data.organization_id)
|
|
104
|
-
if (dbUrl ===
|
|
105
|
-
resolve()
|
|
104
|
+
if (dbUrl === false)
|
|
105
|
+
return resolve({dbUrl: false, error: 'database url could not be found'})
|
|
106
106
|
|
|
107
107
|
if (!dbUrl) {
|
|
108
108
|
if (data.organization_id === process.env.organization_id) {
|
|
@@ -122,9 +122,11 @@ class CoCreateCrudServer {
|
|
|
122
122
|
dbUrl = organization.databases
|
|
123
123
|
this.databaseUrls.set(data.organization_id, dbUrl)
|
|
124
124
|
} else {
|
|
125
|
-
this.databaseUrls.set(data.organization_id,
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
this.databaseUrls.set(data.organization_id, false)
|
|
126
|
+
if (organization)
|
|
127
|
+
return resolve({dbUrl: false, error: 'database url could not be found'})
|
|
128
|
+
else
|
|
129
|
+
return resolve({organization: false, error: 'organization could not be found'})
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
}
|