@itutoring/itutoring_application_js_api 1.0.13 → 1.0.15

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.
Files changed (2) hide show
  1. package/apiController.js +6 -5
  2. package/package.json +1 -1
package/apiController.js CHANGED
@@ -10,19 +10,20 @@ class APIController
10
10
  static #CLIENT_KEY = "-1";
11
11
 
12
12
  /**
13
- *
13
+ * R_KEY MUST be loaded before calling this method!
14
14
  * @returns Returns apropriate rest url based on current server.
15
15
  */
16
16
  static REST_URL()
17
17
  {
18
- if (location.hostname == 'localhost')
18
+ if (location.hostname == 'localhost' || this.#R_KEY == R_KEYs.r_key_test)
19
19
  {
20
- return "https://api.test.itutoring.cz";
20
+ return "https://api.test.itutoring.cz/";
21
21
 
22
22
  }
23
- else
23
+
24
+ if (this.#R_KEY == R_KEYs.r_key_live)
24
25
  {
25
- return "https://api.itutoring.cz";
26
+ return "https://api.itutoring.cz/";
26
27
  }
27
28
  }
28
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itutoring/itutoring_application_js_api",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Javascript API for iTutoring Application",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",