tradly 1.0.46 → 1.0.49

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/App.js +16 -8
  2. package/package.json +1 -1
package/Roots/App.js CHANGED
@@ -117,11 +117,15 @@ class App {
117
117
  }
118
118
  async getAccountDetail(param={id,slug,authKey}) {
119
119
  var path = ''
120
- if (id != undefined || id != '') {
121
- path = `/${param.id}`;
120
+ if (param.id != undefined) {
121
+ if (param.id.length != 0) {
122
+ path = `/${param.id}`;
123
+ }
122
124
  }
123
- if (slug != undefined || slug != '') {
124
- path = SLUG +`${param.slug}`
125
+ if (param.slug != undefined) {
126
+ if (param.slug.length != 0) {
127
+ path = SLUG +`${param.slug}`
128
+ }
125
129
  }
126
130
  try { const [error, responseJson] = await network.networkCall({path:ACCOUNTS + `${path}`,method:Method.GET,authKey:param.authKey});
127
131
  if (error) { return error }
@@ -171,11 +175,15 @@ class App {
171
175
  }
172
176
  async getListingDetail(param={id,slug,authKey}) {
173
177
  var path = ''
174
- if (param.id != undefined || param.id != '') {
175
- path = `/${param.id}`;
178
+ if (param.id != undefined) {
179
+ if (param.id.length != 0) {
180
+ path = `/${param.id}`;
181
+ }
176
182
  }
177
- if (param.slug != undefined || param.slug != '') {
178
- path = SLUG +`${param.slug}`
183
+ if (param.slug != undefined) {
184
+ if (param.slug.length != 0) {
185
+ path = SLUG +`${param.slug}`
186
+ }
179
187
  }
180
188
  try { const [error, responseJson] = await network.networkCall({path:LISTINGS + `${path}`,method:Method.GET,authKey:param.authKey});
181
189
  if (error) { return error }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.46",
3
+ "version": "1.0.49",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",