bx-rest 0.0.32 → 0.0.34
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/esm2020/request/user.mjs +1 -1
- package/esm2020/services/http/HttpBX.mjs +9 -5
- package/fesm2015/bx-rest.mjs +8 -4
- package/fesm2015/bx-rest.mjs.map +1 -1
- package/fesm2020/bx-rest.mjs +8 -4
- package/fesm2020/bx-rest.mjs.map +1 -1
- package/package.json +1 -1
- package/request/lists/element.d.ts +2 -2
- package/request/user.d.ts +2 -2
- package/services/http/HttpBX.d.ts +2 -1
package/fesm2020/bx-rest.mjs
CHANGED
|
@@ -1211,10 +1211,15 @@ class HttpBXServices extends HttpServices {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
post(name, params = {}, textError = '', mapHttp = undefined, settings = this.defSettings) {
|
|
1213
1213
|
return this.httpPost(this.getNameMethod(name), params, textError, settings).pipe(map(v => {
|
|
1214
|
+
console.log('result', v);
|
|
1214
1215
|
if (v && v.result && REST_SETTINGS.support.map && mapHttp) {
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1216
|
+
// console.log('result2', v, Array.isArray(v.result)
|
|
1217
|
+
// ? Object.assign(v, {result: v.result.map(i => mapHttp(i))}) as iHttpAnswerBX<R>
|
|
1218
|
+
// : Object.assign(v, {result: mapHttp(v.result)}) as iHttpAnswerBX<R>)
|
|
1219
|
+
// Array.isArray(v.result)
|
|
1220
|
+
// ? Object.assign(v, {result: v.result.map(i => mapHttp(i))}) as iHttpAnswerBX<R>
|
|
1221
|
+
// :
|
|
1222
|
+
return Object.assign(v, { result: mapHttp(v.result) });
|
|
1218
1223
|
}
|
|
1219
1224
|
return v;
|
|
1220
1225
|
}), map(v => (v && REST_SETTINGS.support.result) ? mapResult : v));
|
|
@@ -1238,7 +1243,6 @@ class HttpBXServices extends HttpServices {
|
|
|
1238
1243
|
paramsClone[this.session.getKeyAuth()] = auth;
|
|
1239
1244
|
return this.session.getBaseUrl().pipe(mergeMap(v => {
|
|
1240
1245
|
if (v) {
|
|
1241
|
-
console.log('v', v);
|
|
1242
1246
|
return this.http.post(this.prepareBaseAddress(v) + url, this.getHttpParamsPost(paramsClone, new FormData(), false, [], settings))
|
|
1243
1247
|
.pipe(take(1), catchError(err => {
|
|
1244
1248
|
if (!textError.length && err.error.error_description) {
|