ember-arcgis-portal-services
Advanced tools
Comparing version 0.8.9 to 0.9.0
@@ -85,3 +85,2 @@ import Ember from 'ember'; | ||
/** | ||
@@ -88,0 +87,0 @@ * Upload a resource (file) to an item |
@@ -8,13 +8,28 @@ import Ember from 'ember'; | ||
/** | ||
* Update an existing item | ||
* will update the `/data` if the `.text` value is present | ||
* Update the portal | ||
*/ | ||
update (portal) { | ||
console.log('Portal Service got update for ' + portal.id); | ||
// console.log('Portal Service got update for ' + portal.id); | ||
let portalRestUrl = this.get('portalRestUrl'); | ||
let url = `${portalRestUrl}/portals/${portal.id}/update?f=json`; | ||
return this._post(url, portal); | ||
let serializedPortal = this._serializePortal(portal); | ||
return this._post(url, serializedPortal); | ||
}, | ||
/** | ||
* Serialize Portal | ||
* There is not much we can actually update on this object, so | ||
* we strip it down A LOT. | ||
*/ | ||
_serializePortal (portal) { | ||
let clone = {}; | ||
// if more properties are needed, please open a PR on this project | ||
if (portal.portalProperties) { | ||
clone.portalProperties = JSON.stringify(portal.portalProperties); | ||
} | ||
return clone; | ||
}, | ||
/** | ||
* Shared logic for POST operations | ||
@@ -21,0 +36,0 @@ */ |
@@ -5,2 +5,7 @@ # Change Log | ||
## [0.9.0] | ||
### Changed | ||
- `portalService.update` was not working; now it will update the `portalProperties` hash only. | ||
- all tests (minimal as they are) pass. | ||
## [0.8.9] | ||
@@ -7,0 +12,0 @@ ### Added |
{ | ||
"name": "ember-arcgis-portal-services", | ||
"version": "0.8.9", | ||
"version": "0.9.0", | ||
"description": "A set of promise-based Ember Services for working with the ArcGIS Portal API.", | ||
@@ -5,0 +5,0 @@ "directories": { |
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
34148
695
26