@cocreate/crud-server
Advanced tools
Comparing version 1.28.7 to 1.28.8
@@ -0,1 +1,8 @@ | ||
## [1.28.8](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.28.7...v1.28.8) (2023-10-16) | ||
### Bug Fixes | ||
* improved error handling ([aa57afd](https://github.com/CoCreate-app/CoCreate-crud-server/commit/aa57afd5e20b8512ec9db7948fda35948b9d109b)) | ||
## [1.28.7](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.28.6...v1.28.7) (2023-10-14) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@cocreate/crud-server", | ||
"version": "1.28.7", | ||
"version": "1.28.8", | ||
"description": "CoCreate-crud-server", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -81,3 +81,3 @@ 'use strict'; | ||
if (storages === false) | ||
return resolve({ storage: false, error: 'A storage or database could not be found' }) | ||
return resolve({ serverStorage: false, error: 'A storage or database could not be found' }) | ||
@@ -97,13 +97,11 @@ if (!storages) { | ||
}) | ||
if (organization && organization.object && organization.object[0]) | ||
organization = organization.object[0] | ||
if (organization && organization.storage) { | ||
storages = organization.storage | ||
this.storages.set(data.organization_id, storages) | ||
if (organization | ||
&& organization.object | ||
&& organization.object[0]) { | ||
if (organization.object[0].storage) | ||
this.storages.set(data.organization_id, organization.object[0].storage) | ||
else | ||
return resolve({ serverStorage: false, error: 'A storage url could not be found' }) | ||
} else { | ||
this.storages.set(data.organization_id, false) | ||
if (organization) | ||
return resolve({ storage: false, error: 'database url could not be found' }) | ||
else | ||
return resolve({ organization: false, error: 'organization could not be found' }) | ||
return resolve({ serverOrganization: false, error: 'An organization could not be found' }) | ||
} | ||
@@ -110,0 +108,0 @@ } |
117714
243