laravel-request 1.1.23 → 1.1.25

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/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "laravel-request",
3
3
  "productName": "laravel-request",
4
- "version": "1.1.23",
4
+ "version": "1.1.25",
5
5
  "description": "laravel-request",
6
6
  "main": "src/index.js",
7
7
  "type": "module",
8
- "module": "ESNext",
9
8
  "scripts": {},
10
9
  "keywords": [],
11
10
  "author": {
package/src/Api.js CHANGED
@@ -23,6 +23,15 @@ export default class Api {
23
23
  return localStorage.getItem('api_token');
24
24
  }
25
25
 
26
+ /**
27
+ *
28
+ * @return {string}
29
+ */
30
+ static domainResolver = () =>
31
+ {
32
+ return process.env.REACT_APP_API_URL;
33
+ }
34
+
26
35
  /**
27
36
  *
28
37
  * @param controller
package/src/ApiRequest.js CHANGED
@@ -28,7 +28,7 @@ export default class ApiRequest {
28
28
  */
29
29
  constructor(target, focus, data = {}, method = 'GET') {
30
30
  let self = this;
31
- this.domain = process.env.REACT_APP_API_URL;
31
+ this.domain = Api.domainResolver();
32
32
  this.target = target;
33
33
  this.focus = focus;
34
34
  this.method = method;