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.
- package/Roots/App.js +16 -8
- 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
|
|
121
|
-
|
|
120
|
+
if (param.id != undefined) {
|
|
121
|
+
if (param.id.length != 0) {
|
|
122
|
+
path = `/${param.id}`;
|
|
123
|
+
}
|
|
122
124
|
}
|
|
123
|
-
if (slug != undefined
|
|
124
|
-
|
|
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
|
|
175
|
-
|
|
178
|
+
if (param.id != undefined) {
|
|
179
|
+
if (param.id.length != 0) {
|
|
180
|
+
path = `/${param.id}`;
|
|
181
|
+
}
|
|
176
182
|
}
|
|
177
|
-
if (param.slug != undefined
|
|
178
|
-
|
|
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 }
|