hart-estate-widget 0.0.25 → 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.
@@ -20,7 +20,7 @@ const defaultConfig = {
20
20
  rotationImages: [],
21
21
  panoramaImages: [],
22
22
  json: null,
23
- env: 'production'
23
+ API_URL: 'https://backend.estate.hart-digital.com'
24
24
  };
25
25
  var _default = defaultConfig;
26
26
  exports.default = _default;
@@ -22,14 +22,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
22
22
  });
23
23
 
24
24
  class ApiStore {
25
- constructor() {
26
- let env = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'production';
27
-
28
- _defineProperty(this, "PRODUCTION_API_URL", 'https://backend.estate.myhart.ru');
29
-
30
- _defineProperty(this, "STAGE_API_URL", 'https://backend-stage.estate.myhart.ru');
31
-
32
- _defineProperty(this, "env", null);
25
+ constructor(API_URL) {
26
+ _defineProperty(this, "API_URL", null);
33
27
 
34
28
  _defineProperty(this, "loadFurnitureData", async furniture => {
35
29
  const furnitureQuery = furniture.reduce((acc, item, i) => acc += "".concat(i === 0 ? '' : ',').concat(item.Model), '');
@@ -62,11 +56,7 @@ class ApiStore {
62
56
  });
63
57
 
64
58
  (0, _mobx.makeAutoObservable)(this);
65
- this.env = env;
66
- }
67
-
68
- get API_URL() {
69
- return this.env === 'stage' ? this.STAGE_API_URL : this.PRODUCTION_API_URL;
59
+ this.API_URL = API_URL;
70
60
  }
71
61
 
72
62
  }
@@ -68,7 +68,7 @@ class HouseStore {
68
68
  constructor(modelStore) {
69
69
  _defineProperty(this, "modelStore", null);
70
70
 
71
- _defineProperty(this, "apiStore", new _apiStore.default(_store.default.config.env));
71
+ _defineProperty(this, "apiStore", new _apiStore.default(_store.default.config.API_URL));
72
72
 
73
73
  _defineProperty(this, "houseGroup", new THREE.Group());
74
74
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "HART Estate widget",
4
4
  "author": "HART",
5
5
  "keywords": [],
6
- "version": "0.0.25",
6
+ "version": "0.0.26",
7
7
  "private": false,
8
8
  "main": "build/index.js",
9
9
  "module": "build/index.js",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file