tradly 1.1.89 → 1.1.91

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/Roots/SetSDK.js +18 -3
  2. package/package.json +1 -1
package/Roots/SetSDK.js CHANGED
@@ -13,7 +13,11 @@ class SetSDK {
13
13
  init = { domain, env, custom_header, pk_key, domain_details }
14
14
  ) {
15
15
  try {
16
- if (init?.pk_key && init?.domain_details) {
16
+ if (
17
+ init?.pk_key &&
18
+ init?.domain_details &&
19
+ init?.domain_details?.tenant_name
20
+ ) {
17
21
  APPCONSTANT.TOKEN = init.pk_key;
18
22
  APPCONSTANT.DOMAIN_ID =
19
23
  init.domain_details?.id ?? 0;
@@ -26,6 +30,9 @@ class SetSDK {
26
30
  status: true,
27
31
  key: init?.pk_key,
28
32
  domain_details: init?.domain_details,
33
+ tenant_name:
34
+ init?.domain_details?.tenant_name ??
35
+ "",
29
36
  };
30
37
  } else {
31
38
  const response = await axios({
@@ -55,8 +62,16 @@ class SetSDK {
55
62
  return {
56
63
  status: true,
57
64
  key: response.data.data.key,
58
- domain_details:
59
- response.data.data.domain,
65
+ domain_details: {
66
+ ...response.data.data.domain,
67
+ tenant_name:
68
+ response.data.data
69
+ .tenant_name ??
70
+ "",
71
+ },
72
+ tenant_name:
73
+ response.data.data
74
+ .tenant_name ?? "",
60
75
  };
61
76
  }
62
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.1.89",
3
+ "version": "1.1.91",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",