tradly 1.1.9 → 1.1.11

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.
@@ -6,11 +6,6 @@ import { APPCONSTANT } from "../Constants/AppConstant.js";
6
6
  import { REFRESH } from "../Constants/PathConstant.js";
7
7
  import Environment, { ImageConfig } from "../Helper/APIParam.js";
8
8
 
9
- var header = {
10
- Accept: "application/json",
11
- "Content-Type": "application/json",
12
- "x-agent": 1,
13
- };
14
9
  export const Method = {
15
10
  GET: "GET",
16
11
  DELETE: "DELETE",
@@ -33,8 +28,17 @@ class NetworkManager {
33
28
  networkCall = async (config = TradlyConfig) => {
34
29
  var BaseURL = Environment(APPCONSTANT.ENVIRONMENT);
35
30
  var url = BaseURL + config.path;
31
+ var header = {
32
+ Accept: "application/json",
33
+ "Content-Type": "application/json",
34
+ "x-agent": 1,
35
+ };
36
36
  header["Authorization"] = "Bearer " + APPCONSTANT.TOKEN;
37
- if (config.authKey !== undefined || config.authKey !== "") {
37
+ if (
38
+ config.authKey !== null &&
39
+ config.authKey !== undefined &&
40
+ config.authKey?.length > 0
41
+ ) {
38
42
  header["x-auth-key"] = config.authKey;
39
43
  }
40
44
  if (config.currency != undefined || config.currency == "") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",