tradly 1.0.44 → 1.0.45
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 +26 -10
- package/package.json +1 -1
package/Roots/App.js
CHANGED
|
@@ -115,12 +115,20 @@ class App {
|
|
|
115
115
|
else { return responseJson }
|
|
116
116
|
} catch (error) { return error }
|
|
117
117
|
}
|
|
118
|
-
async getAccountDetail(param={id,authKey}) {
|
|
119
|
-
|
|
118
|
+
async getAccountDetail(param={id,slug,authKey}) {
|
|
119
|
+
var path = ''
|
|
120
|
+
if (id != undefined || id != '') {
|
|
121
|
+
path = `/${param.id}`;
|
|
122
|
+
}
|
|
123
|
+
if (slug != undefined || slug != '') {
|
|
124
|
+
path = SLUG +`${param.slug}`
|
|
125
|
+
}
|
|
126
|
+
try { const [error, responseJson] = await network.networkCall({path:ACCOUNTS + `${path}`,method:Method.GET,authKey:param.authKey});
|
|
120
127
|
if (error) { return error }
|
|
121
128
|
else { return responseJson }
|
|
122
129
|
} catch (error) { return error }
|
|
123
130
|
}
|
|
131
|
+
|
|
124
132
|
async postAccounts(param={id,authKey,data}) {
|
|
125
133
|
let method = param.id == undefined || param.id == '' ? Method.POST : Method.PUT
|
|
126
134
|
let path = param.id == undefined || param.id == '' ? ACCOUNTS : ACCOUNTS + `/${param.id}`
|
|
@@ -161,18 +169,26 @@ class App {
|
|
|
161
169
|
else { return responseJson }
|
|
162
170
|
} catch (error) { return error }
|
|
163
171
|
}
|
|
164
|
-
async getListingDetail(param={id,authKey}) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
+
async getListingDetail(param={id,slug,authKey}) {
|
|
173
|
+
var path = ''
|
|
174
|
+
if (id != undefined || id != '') {
|
|
175
|
+
path = `/${param.id}`;
|
|
176
|
+
}
|
|
177
|
+
if (slug != undefined || slug != '') {
|
|
178
|
+
path = SLUG +`${param.slug}`
|
|
179
|
+
}
|
|
180
|
+
try { const [error, responseJson] = await network.networkCall({path:LISTINGS + `${path}`,method:Method.GET,authKey:param.authKey});
|
|
172
181
|
if (error) { return error }
|
|
173
182
|
else { return responseJson }
|
|
174
183
|
} catch (error) { return error }
|
|
175
184
|
}
|
|
185
|
+
// async getListingSlug(param={id,slug,authKey}) {
|
|
186
|
+
|
|
187
|
+
// try { const [error, responseJson] = await network.networkCall({path:LISTINGS + SLUG +`/${param.id}`,method:Method.GET,authKey:param.authKey});
|
|
188
|
+
// if (error) { return error }
|
|
189
|
+
// else { return responseJson }
|
|
190
|
+
// } catch (error) { return error }
|
|
191
|
+
// }
|
|
176
192
|
async deleteListing(param={id,authKey}) {
|
|
177
193
|
try { const [error, responseJson] = await network.networkCall({path:LISTINGS + `/${param.id}`,method:Method.DELETE,authKey:param.authKey});
|
|
178
194
|
if (error) { return error }
|