@xuda.io/xuda-worker-bundle-min 1.3.382 → 1.3.383
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 +7 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -367,19 +367,23 @@ func.common.db = async function (
|
|
|
367
367
|
const db = await func.utils.connect_pouchdb(SESSION_ID);
|
|
368
368
|
let _data = _.cloneDeep(dataP);
|
|
369
369
|
|
|
370
|
-
|
|
370
|
+
function cleanString(json) {
|
|
371
|
+
let str = JSON.stringify(json);
|
|
372
|
+
// Replace all non-alphanumeric characters with an empty string
|
|
373
|
+
return str.replace(/[^a-zA-Z0-9]/g, "");
|
|
374
|
+
}
|
|
371
375
|
|
|
372
376
|
delete _data.fields;
|
|
373
377
|
delete _data.viewSourceDesc;
|
|
374
378
|
if (_data.skip === null) {
|
|
375
379
|
delete _data.skip;
|
|
376
380
|
}
|
|
377
|
-
const rep_id =
|
|
381
|
+
const rep_id = cleanString(_data);
|
|
378
382
|
|
|
379
383
|
////// validate existence of whole table request
|
|
380
384
|
|
|
381
385
|
try {
|
|
382
|
-
let table_req_id =
|
|
386
|
+
let table_req_id = cleanString({
|
|
383
387
|
table_id: _data.table_id,
|
|
384
388
|
limit: 99999999,
|
|
385
389
|
key: _data.table_id,
|