@itutoring/itutoring_application_js_api 1.6.29 → 1.6.31
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 +15 -11
- package/package.json +1 -1
package/apiController.js
CHANGED
|
@@ -87,7 +87,7 @@ class APIController
|
|
|
87
87
|
if (this.LastCall === null || this.ConfirmationToken === null)
|
|
88
88
|
return;
|
|
89
89
|
|
|
90
|
-
this.LastCall.data['
|
|
90
|
+
this.LastCall.data['conf_token'] = this.ConfirmationToken;
|
|
91
91
|
if (this.LastCall.type === "GET")
|
|
92
92
|
return await this.Get(this.LastCall.module, this.LastCall.method, this.LastCall.data);
|
|
93
93
|
else if (this.LastCall.type === "POST")
|
|
@@ -173,17 +173,19 @@ class APIController
|
|
|
173
173
|
{
|
|
174
174
|
if (request.readyState === 4)
|
|
175
175
|
{
|
|
176
|
-
var response = APIController.ResolveResponse(request);
|
|
177
|
-
if (useCache)
|
|
178
|
-
{
|
|
179
|
-
APICache.Cache(module + method + cacheSuffix, response);
|
|
180
|
-
}
|
|
181
176
|
APIController.LastCall = {
|
|
182
177
|
"type": "GET",
|
|
183
178
|
"module": module,
|
|
184
179
|
"method": method,
|
|
185
180
|
"data": data,
|
|
186
181
|
}
|
|
182
|
+
|
|
183
|
+
var response = APIController.ResolveResponse(request);
|
|
184
|
+
if (useCache)
|
|
185
|
+
{
|
|
186
|
+
APICache.Cache(module + method + cacheSuffix, response);
|
|
187
|
+
}
|
|
188
|
+
|
|
187
189
|
resolve(response);
|
|
188
190
|
}
|
|
189
191
|
}
|
|
@@ -237,17 +239,19 @@ class APIController
|
|
|
237
239
|
{
|
|
238
240
|
if (request.readyState === 4)
|
|
239
241
|
{
|
|
240
|
-
var response = APIController.ResolveResponse(request);
|
|
241
|
-
if (useCache)
|
|
242
|
-
{
|
|
243
|
-
APICache.Cache(module + method, response);
|
|
244
|
-
}
|
|
245
242
|
APIController.LastCall = {
|
|
246
243
|
"type": "POST",
|
|
247
244
|
"module": module,
|
|
248
245
|
"method": method,
|
|
249
246
|
"data": data,
|
|
250
247
|
}
|
|
248
|
+
|
|
249
|
+
var response = APIController.ResolveResponse(request);
|
|
250
|
+
if (useCache)
|
|
251
|
+
{
|
|
252
|
+
APICache.Cache(module + method, response);
|
|
253
|
+
}
|
|
254
|
+
|
|
251
255
|
resolve(response);
|
|
252
256
|
}
|
|
253
257
|
}
|