@itutoring/itutoring_application_js_api 1.6.2 → 1.6.4
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 +6 -0
- package/modules/LectorDatabase.js +2 -1
- package/package.json +1 -1
package/apiController.js
CHANGED
|
@@ -222,12 +222,14 @@ class APIController
|
|
|
222
222
|
if (APIController.#R_KEY !== "-1")
|
|
223
223
|
{
|
|
224
224
|
resolve(APIController.#R_KEY);
|
|
225
|
+
return;
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
if (localStorage.getItem("r_key") !== null)
|
|
228
229
|
{
|
|
229
230
|
APIController.#R_KEY = localStorage.getItem("r_key");
|
|
230
231
|
resolve(APIController.#R_KEY);
|
|
232
|
+
return;
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
// For localhost don't use xml config, but automatically
|
|
@@ -236,6 +238,7 @@ class APIController
|
|
|
236
238
|
{
|
|
237
239
|
APIController.#R_KEY = R_KEYs.r_key_test;
|
|
238
240
|
resolve(APIController.#R_KEY);
|
|
241
|
+
return;
|
|
239
242
|
}
|
|
240
243
|
else
|
|
241
244
|
{
|
|
@@ -248,6 +251,7 @@ class APIController
|
|
|
248
251
|
APIController.#R_KEY = rKey;
|
|
249
252
|
localStorage.setItem("r_key", APIController.#R_KEY)
|
|
250
253
|
resolve(APIController.#R_KEY);
|
|
254
|
+
|
|
251
255
|
});
|
|
252
256
|
}
|
|
253
257
|
});
|
|
@@ -260,12 +264,14 @@ class APIController
|
|
|
260
264
|
if (APIController.#CLIENT_KEY !== "-1")
|
|
261
265
|
{
|
|
262
266
|
resolve(APIController.#CLIENT_KEY);
|
|
267
|
+
return;
|
|
263
268
|
}
|
|
264
269
|
|
|
265
270
|
if (localStorage.getItem("client_key") !== null)
|
|
266
271
|
{
|
|
267
272
|
APIController.#CLIENT_KEY = localStorage.getItem("client_key");
|
|
268
273
|
resolve(APIController.#CLIENT_KEY);
|
|
274
|
+
return;
|
|
269
275
|
}
|
|
270
276
|
|
|
271
277
|
let keyPath = '/client_key.xml';
|
|
@@ -150,11 +150,12 @@ class LectorDatabase
|
|
|
150
150
|
* @param {number} maxCount
|
|
151
151
|
* @returns {Promise<array>}
|
|
152
152
|
*/
|
|
153
|
-
static async getPublicProfiles(offset = 0, maxCount = -1)
|
|
153
|
+
static async getPublicProfiles(offset = 0, maxCount = -1, onlyWithProfilePictures = false)
|
|
154
154
|
{
|
|
155
155
|
return await APIController.Get(this.#MODULE, this.#GET_PUBLIC_PROFILES, {
|
|
156
156
|
'offset': offset,
|
|
157
157
|
'max': maxCount,
|
|
158
|
+
'onlyWithProfilePictures': onlyWithProfilePictures,
|
|
158
159
|
});
|
|
159
160
|
}
|
|
160
161
|
}
|