@xuda.io/xuda-worker-bundle-min 1.3.492 → 1.3.493
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/index.js +32 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -386,6 +386,26 @@ func.common.db = async function (
|
|
|
386
386
|
);
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
|
+
const delete_dbs_pouch = async function (db) {
|
|
390
|
+
try {
|
|
391
|
+
const { code: table_req_code, data: table_req_id } =
|
|
392
|
+
await validate_existence_of_whole_table_request(db);
|
|
393
|
+
|
|
394
|
+
if (table_req_code > 0) {
|
|
395
|
+
data.full_table_downloaded = true;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
await db.get(dataP.row_id);
|
|
399
|
+
return await func.db.pouch["del"](SESSION_ID, data);
|
|
400
|
+
} catch (err) {
|
|
401
|
+
return await func.common.perform_rpi_request(
|
|
402
|
+
SESSION_ID,
|
|
403
|
+
serviceP,
|
|
404
|
+
opt,
|
|
405
|
+
data
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
};
|
|
389
409
|
const create_dbs_pouch = async function (db) {
|
|
390
410
|
try {
|
|
391
411
|
// if (_session.DS_GLB[0].data_system.SYS_GLOBAL_BOL_ONLINE) {
|
|
@@ -455,6 +475,18 @@ func.common.db = async function (
|
|
|
455
475
|
}
|
|
456
476
|
break;
|
|
457
477
|
}
|
|
478
|
+
case "dbs_delete": {
|
|
479
|
+
try {
|
|
480
|
+
const ret = {
|
|
481
|
+
code: 1,
|
|
482
|
+
data: await delete_dbs_pouch(db),
|
|
483
|
+
};
|
|
484
|
+
return success_callback(ret);
|
|
485
|
+
} catch (err) {
|
|
486
|
+
return error_callback(err);
|
|
487
|
+
}
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
458
490
|
|
|
459
491
|
default:
|
|
460
492
|
try {
|