griddo-sdk 1.0.13 → 1.0.15

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/index.js CHANGED
@@ -20,7 +20,7 @@ class SDK {
20
20
  this.getStructuredData = this.getStructuredData.bind(this);
21
21
  this.saveStructuredData = this.saveStructuredData.bind(this);
22
22
  this.deleteStructuredData = this.deleteStructuredData.bind(this);
23
- this.mapStructuredData = this.mapStructuredData(this);
23
+ this.mapStructuredData = this.mapStructuredData.bind(this);
24
24
  this.getLanguage = this.getLanguage.bind(this);
25
25
  this.getDefaultLanguage = this.getDefaultLanguage.bind(this);
26
26
  this.languages = [];
@@ -4,7 +4,7 @@ const getStructuredData = async (env, contentType, site = null, language = null)
4
4
  const headers = {
5
5
  lang: language,
6
6
  };
7
- const items = await api(env, 'get', `${site ? `/site/${site}` : ''}/structured_data_contents/${contentType||''}?pagination=false&includeDraft=true`, { headers })
7
+ const items = await api(env, 'get', `${site ? `/site/${site}` : ''}/structured_data_contents/${contentType||''}?pagination=false&includeDraft=true`, null, headers)
8
8
  .then(data => data.items);
9
9
  if (env.verbose) console.log(`\tStructured data ${contentType} loaded.`);
10
10
  return items;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "griddo-sdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {