@itutoring/itutoring_application_js_api 1.26.2 → 1.27.1

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 +4 -24
  2. package/package.json +1 -1
package/apiController.js CHANGED
@@ -56,25 +56,6 @@ class APIController
56
56
 
57
57
  static async CreateVisitorSession()
58
58
  {
59
- var id = '';
60
- const urlParams = new URLSearchParams(window.location.search);
61
- if (urlParams.has("vid"))
62
- {
63
- if (CookiesManager.GetCookie("session_url") != null)
64
- CookiesManager.RemoveCookie("session_url");
65
-
66
- id = urlParams.get("vid");
67
- const date = new Date();
68
- date.setTime(date.getTime() + (7 * 24 * 60 * 60 * 1000));
69
- CookiesManager.SetCookie("session_url", id, date.toUTCString());
70
- }
71
- else
72
- {
73
- id = Date.now();
74
- const date = new Date();
75
- date.setTime(date.getTime() + (7 * 24 * 60 * 60 * 1000));
76
- CookiesManager.SetCookie("session", id, date.toUTCString());
77
- }
78
59
  this.ReadUserSource();
79
60
 
80
61
  var rKey = await this.GetLocalRKey();
@@ -83,10 +64,9 @@ class APIController
83
64
 
84
65
  static GetVisitorSessionID()
85
66
  {
86
- //console.log(CookiesManager.GetCookie("session"));
87
- if (CookiesManager.GetCookie("session_url") != null)
88
- return CookiesManager.GetCookie("session_url");
89
- return CookiesManager.GetCookie("session");
67
+ const urlParams = new URLSearchParams(window.location.search);
68
+ if (urlParams.has("vid"))
69
+ return urlParams.get("vid");
90
70
  }
91
71
 
92
72
  static ReadUserSource()
@@ -359,7 +339,7 @@ class APIController
359
339
 
360
340
  if (args != null)
361
341
  {
362
- for (const [key, value] of Object.entries(args))
342
+ for ([key, value] of Object.entries(args))
363
343
  {
364
344
  if (typeof value === "object")
365
345
  value = JSON.stringify(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itutoring/itutoring_application_js_api",
3
- "version": "1.26.2",
3
+ "version": "1.27.1",
4
4
  "description": "Javascript API for iTutoring Application",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",