@itutoring/itutoring_application_js_api 1.6.42 → 1.6.44
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/apiController.js +11 -1
- package/modules/TableExplorer.js +2 -2
- package/package.json +1 -1
package/apiController.js
CHANGED
|
@@ -28,6 +28,8 @@ class APIController
|
|
|
28
28
|
static LastCall = null;
|
|
29
29
|
static ConfirmationToken = null;
|
|
30
30
|
|
|
31
|
+
static IsTestServer = null;
|
|
32
|
+
|
|
31
33
|
/**
|
|
32
34
|
* R_KEY MUST be loaded before calling this method!
|
|
33
35
|
* @returns Returns appropriate rest url based on current server.
|
|
@@ -46,7 +48,12 @@ class APIController
|
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
static
|
|
51
|
+
static TestServerCheck()
|
|
52
|
+
{
|
|
53
|
+
return this.IsTestServer;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static async CreateVisitorSession()
|
|
50
57
|
{
|
|
51
58
|
const id = Date.now();
|
|
52
59
|
const date = new Date();
|
|
@@ -54,6 +61,9 @@ class APIController
|
|
|
54
61
|
|
|
55
62
|
CookiesManager.SetCookie("session", id, date.toUTCString());
|
|
56
63
|
this.ReadUserSource();
|
|
64
|
+
|
|
65
|
+
var rKey = await this.GetLocalRKey();
|
|
66
|
+
this.IsTestServer = rKey === R_KEYs.r_key_test || location.hostname === 'localhost';
|
|
57
67
|
}
|
|
58
68
|
|
|
59
69
|
static GetVisitorSessionID()
|
package/modules/TableExplorer.js
CHANGED
|
@@ -39,11 +39,11 @@ class TableExplorer
|
|
|
39
39
|
static #SET_CUSTOM_LOAD_QUERY = "SetCustomLoadQuery";
|
|
40
40
|
|
|
41
41
|
static async setCustomLoadQuery(token, query, variables = {})
|
|
42
|
-
{
|
|
42
|
+
{
|
|
43
43
|
await APIController.Post(this.#MODULE, this.#SET_CUSTOM_LOAD_QUERY, {
|
|
44
44
|
'token': token,
|
|
45
45
|
'filter': query,
|
|
46
|
-
'filterVariables': variables,
|
|
46
|
+
'filterVariables': JSON.stringify(variables),
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
|