griddo-sdk 1.1.2 → 1.1.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.
Files changed (2) hide show
  1. package/api/index.js +4 -5
  2. package/package.json +1 -1
package/api/index.js CHANGED
@@ -6,7 +6,7 @@ const api = (env, method, endpoint, body = null, headers = {}) => {
6
6
  token,
7
7
  } = env;
8
8
  if (!api) throw new Error('Class SDK should be initialized with connect method.');
9
- return apiCall(api, token, method, endpoint, body = null, headers = {});
9
+ return apiCall(api, token, method, endpoint, body, headers);
10
10
  };
11
11
 
12
12
  const publicApi = (env, method, endpoint, body = null, headers = {}) => {
@@ -15,11 +15,10 @@ const publicApi = (env, method, endpoint, body = null, headers = {}) => {
15
15
  token,
16
16
  } = env;
17
17
  if (!publicApi) throw new Error('Public API should be declared at initialization.');
18
- return apiCall(api, token, method, endpoint, body = null, headers = {});
18
+ return apiCall(api, token, method, endpoint, body, headers);
19
19
  };
20
20
 
21
- const apiCall = (api,token, method, endpoint, body = null, headers = {}) => {
22
-
21
+ const apiCall = (api, token, method, endpoint, body = null, headers = {}) => {
23
22
  const noBodyMethods = [
24
23
  'get',
25
24
  'delete',
@@ -34,7 +33,7 @@ const apiCall = (api,token, method, endpoint, body = null, headers = {}) => {
34
33
  .then(response => response.data);
35
34
  };
36
35
 
37
- module.exports={
36
+ module.exports = {
38
37
  api,
39
38
  publicApi,
40
39
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "griddo-sdk",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {