tradly 1.0.2 → 1.0.3

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.
@@ -0,0 +1,3 @@
1
+
2
+ export var BTOKEN = {token: ''};
3
+
@@ -2,6 +2,7 @@
2
2
 
3
3
  import {to} from 'await-to-js';
4
4
  import axios from 'axios';
5
+ import { BTOKEN } from '../Constants/AppConstant.js';
5
6
  import {BASEURL} from './../Constants/PathConstant.js'
6
7
 
7
8
  var header = {
@@ -13,7 +14,7 @@ class NetworkManager {
13
14
  networkCall = async (path,method, params,authkey, refreshKey) => {
14
15
  var BaseURL = BASEURL;
15
16
  var url = BaseURL + path;
16
- header['Authorization'] = "Bearer " + global.btoken;
17
+ header['Authorization'] = "Bearer " + BTOKEN.token;
17
18
  if (authkey != undefined) {
18
19
  header['x-auth-key'] = authkey;
19
20
  }
@@ -1,5 +1,7 @@
1
- import { CONFIG, TENANTS, REFRESH } from "../Constants/PathConstant.js";
1
+ import { BTOKEN } from "../Constants/AppConstant.js";
2
+ import { CONFIG, TENANTS, REFRESH, HOME } from "../Constants/PathConstant.js";
2
3
  import network from "./../NetworkManager/NetworkManager.js"
4
+ import app from './App.js';
3
5
 
4
6
 
5
7
 
@@ -12,8 +14,8 @@ class InitializeSDK {
12
14
  }else {
13
15
  let keyD = responseJson['data']['key'];
14
16
  if(keyD['app_key']) {
15
- global.btoken = keyD['app_key'];
16
- console.log('Success!!')
17
+ BTOKEN.token = keyD['app_key'];
18
+ console.log('Success!!')
17
19
  }
18
20
  return responseJson;
19
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",