@openfn/language-dhis2 3.0.2 → 3.0.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/README.md CHANGED
@@ -9,7 +9,7 @@ Used most commonly via OpenFn.org or by hand with
9
9
  ```sh
10
10
  core execute \
11
11
  -l ../language-dhis2 \
12
- -e ./tmp/myExpressions.js \
12
+ -e ./tmp/expression.js \
13
13
  -s ./tmp/state.json \
14
14
  -o ./tmp/output.json
15
15
  ```
package/lib/Adaptor.js CHANGED
@@ -322,13 +322,14 @@ function create(resourceType, data, options = {}, callback = false) {
322
322
  data: (0, _Utils.nestArray)(data, resourceType),
323
323
  ...requestConfig
324
324
  }).then(result => {
325
- const {
326
- data
327
- } = result;
328
- const details = `with response ${JSON.stringify(data, null, 2)}`;
325
+ const details = `with response ${JSON.stringify(result.data, null, 2)}`;
329
326
 
330
327
  _Utils.Log.success(`Created ${resourceType} ${details}`);
331
328
 
329
+ const {
330
+ location
331
+ } = result.headers;
332
+ if (location) console.log(`Record available @ ${location}`);
332
333
  return (0, _Utils.handleResponse)(result, state, callback);
333
334
  });
334
335
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-dhis2",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "description": "DHIS2 Language Pack for OpenFn",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {