bx-rest 0.0.24 → 0.0.26

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.
@@ -669,7 +669,10 @@ const REST_SETTINGS = {
669
669
  map: true,
670
670
  result: true
671
671
  },
672
- auth: 'cookies'
672
+ auth: 'cookies',
673
+ urls: {
674
+ home: 'b24.trace-studio.com'
675
+ }
673
676
  };
674
677
 
675
678
  class RestServices {
@@ -848,7 +851,11 @@ class SessionKeyServices extends BaseServices {
848
851
  }
849
852
  }
850
853
  getBaseUrl() {
851
- return this.authData$.pipe(map(v => (v && v.domain) ? this.prepareBaseAddress(v.domain, 'b24.trace-studio.com') : undefined));
854
+ return of(this.prepareBaseAddress(REST_SETTINGS.urls.home));
855
+ // return this.authData$.pipe( // разобраться позже
856
+ // take(1),
857
+ // map(v => (v && v.domain) ? this.prepareBaseAddress(v.domain) : undefined)
858
+ // )
852
859
  }
853
860
  }
854
861
  SessionKeyServices.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SessionKeyServices, deps: [{ token: i1$2.Store }, { token: i2$1.ActivatedRoute }, { token: RestServices }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -1214,6 +1221,7 @@ class HttpBXServices extends HttpServices {
1214
1221
  paramsClone[this.session.getKeyAuth()] = auth;
1215
1222
  return this.session.getBaseUrl().pipe(mergeMap(v => {
1216
1223
  if (v) {
1224
+ console.log('v', v);
1217
1225
  return this.http.post(this.prepareBaseAddress(v) + url, this.getHttpParamsPost(paramsClone, new FormData(), false, [], settings))
1218
1226
  .pipe(take(1), catchError(err => {
1219
1227
  if (!textError.length && err.error.error_description) {