@xuda.io/xuda-worker-bundle-min 1.3.388 → 1.3.390
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 +5 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -381,15 +381,14 @@ func.common.db = async function (
|
|
|
381
381
|
const rep_id = cleanString(_data);
|
|
382
382
|
|
|
383
383
|
////// validate existence of whole table request
|
|
384
|
-
|
|
384
|
+
let table_req_id;
|
|
385
385
|
try {
|
|
386
|
-
|
|
386
|
+
table_req_id = cleanString({
|
|
387
387
|
key: _data.table_id,
|
|
388
388
|
limit: 99999999,
|
|
389
389
|
table_id: _data.table_id,
|
|
390
390
|
});
|
|
391
391
|
const doc = await db.get(table_req_id);
|
|
392
|
-
/// delete all requests
|
|
393
392
|
|
|
394
393
|
let ret = await db.find({
|
|
395
394
|
selector: {
|
|
@@ -397,9 +396,10 @@ func.common.db = async function (
|
|
|
397
396
|
table_id: _data.table_id,
|
|
398
397
|
},
|
|
399
398
|
});
|
|
400
|
-
|
|
399
|
+
/// delete table requests
|
|
401
400
|
for (let doc of ret.docs) {
|
|
402
|
-
|
|
401
|
+
if (doc.entire_table) continue;
|
|
402
|
+
func.db.pouch.remove_db_replication_from_server(SESSION_ID, doc._id);
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
if (doc.stat < 3) {
|