opengate-js 14.7.0 → 14.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opengate-js",
3
- "version": "14.7.0",
3
+ "version": "14.7.1",
4
4
  "description": "",
5
5
  "main": "dist/opengate-api-npm.js",
6
6
  "repository": {
@@ -59,20 +59,20 @@ export default class DatasetFinder extends GenericFinder {
59
59
  let _entity = this._entity;
60
60
  this._execute().then((result) => {
61
61
  if (result.data.length > 0) {
62
- var timeserieId;
63
- result.data.forEach((tsData) => {
64
- if (!timeserieId && tsData.name === name) {
65
- timeserieId = tsData.identifier;
62
+ var datasetId;
63
+ result.data.forEach((dsData) => {
64
+ if (!datasetId && dsData.name === name) {
65
+ datasetId = dsData.identifier;
66
66
  }
67
67
  });
68
68
 
69
- if (!timeserieId) {
69
+ if (!datasetId) {
70
70
  defered.reject({
71
71
  error: _error_not_found,
72
72
  statusCode: HttpStatus.NOT_FOUND
73
73
  });
74
74
  } else {
75
- _this._withId(organization + '/' + timeserieId);
75
+ _this._withId(organization + '/' + datasetId);
76
76
 
77
77
  _this._api.get(_this._composeUrl(), undefined, _this._getExtraHeaders(), _this._getUrlParameters(), false, _this._getServiceBaseURL())
78
78
  .then((req) => {
@@ -84,6 +84,10 @@ export default class DatasetFinder extends GenericFinder {
84
84
  } else {
85
85
  if (req.body) {
86
86
  var data = req.body[_entity] && req.body.provision ? req.body : req.body[_entity];
87
+
88
+ if (data) {
89
+ data.identifier = datasetId;
90
+ }
87
91
  defered.resolve({
88
92
  data: data ? data : req.body,
89
93
  statusCode: req.statusCode
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"mappings":"","sources":["opengate-api-bower.js"],"file":"opengate-api-bower-14.7.0.js","sourceRoot":".."}