@janiscommerce/api-save
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -10,2 +10,10 @@ # Changelog | ||
## [1.1.2] - 2019-07-02 | ||
### Fixed | ||
- Version bump for already published version 1.1.1 | ||
## [1.1.1] - 2019-07-02 | ||
### Fixed | ||
- ApiSaveData now checks for not saved MainData | ||
## [1.1.0] - 2019-06-28 | ||
@@ -12,0 +20,0 @@ ### Added |
@@ -35,2 +35,5 @@ 'use strict'; | ||
if(!savedId) | ||
throw new Error('common.message.internalError'); | ||
if(this.hasRelationships()) { | ||
@@ -37,0 +40,0 @@ const apiSaveRelationships = new ApiSaveRelationships(this, savedId, !this.dataToSave.id); |
@@ -16,4 +16,4 @@ 'use strict'; | ||
if(this.apiInstance.dataToSave.id) { | ||
await this.apiInstance.controller.update(dataToSave, { id: this.apiInstance.dataToSave.id }); | ||
return this.apiInstance.dataToSave.id; | ||
const updateResult = await this.apiInstance.controller.update(dataToSave, { id: this.apiInstance.dataToSave.id }); | ||
return !updateResult ? updateResult : this.apiInstance.dataToSave.id; | ||
} | ||
@@ -20,0 +20,0 @@ |
{ | ||
"name": "@janiscommerce/api-save", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A package to handle JANIS Views Save APIs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12606
253