@xuda.io/xuda-worker-bundle-min 1.3.428 → 1.3.430

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/index.js +15 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -280,7 +280,7 @@ func.common.db = async function (
280
280
 
281
281
  return cleanString(_data);
282
282
  };
283
- const validate_existence_of_whole_table_request = async function () {
283
+ const validate_existence_of_whole_table_request = async function (db) {
284
284
  let table_req_id;
285
285
  try {
286
286
  table_req_id = cleanString({
@@ -327,7 +327,7 @@ func.common.db = async function (
327
327
  ////// validate existence of whole table request
328
328
 
329
329
  const { code: table_req_code, data: table_req_id } =
330
- await validate_existence_of_whole_table_request();
330
+ await validate_existence_of_whole_table_request(db);
331
331
  if (table_req_code > 0) {
332
332
  return await func.db.pouch[serviceP](SESSION_ID, data);
333
333
  }
@@ -402,6 +402,13 @@ func.common.db = async function (
402
402
  const update_dbs_pouch = async function (db) {
403
403
  debugger;
404
404
  try {
405
+ const { code: table_req_code, data: table_req_id } =
406
+ await validate_existence_of_whole_table_request(db);
407
+
408
+ if (table_req_code > 0) {
409
+ data.full_table_downloaded = true;
410
+ }
411
+
405
412
  await db.get(dataP.row_id);
406
413
  return await func.db.pouch[serviceP](SESSION_ID, data);
407
414
  } catch (err) {
@@ -416,6 +423,12 @@ func.common.db = async function (
416
423
  const create_dbs_pouch = async function (db) {
417
424
  debugger;
418
425
  try {
426
+ const { code: table_req_code, data: table_req_id } =
427
+ await validate_existence_of_whole_table_request(db);
428
+
429
+ if (table_req_code > 0) {
430
+ data.full_table_downloaded = true;
431
+ }
419
432
  return await func.db.pouch[serviceP](SESSION_ID, data);
420
433
  } catch (err) {
421
434
  return await func.common.perform_rpi_request(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.428",
3
+ "version": "1.3.430",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {