@xuda.io/xuda-worker-bundle-min 1.3.479 → 1.3.481

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 +8 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -318,13 +318,19 @@ func.common.db = async function (
318
318
  const { code: table_req_code, data: table_req_id } =
319
319
  await validate_existence_of_whole_table_request(db);
320
320
  if (table_req_code > 0) {
321
- return await func.db.pouch[serviceP](SESSION_ID, data);
321
+ return {
322
+ code: 1,
323
+ data: await func.db.pouch[serviceP](SESSION_ID, data),
324
+ };
322
325
  }
323
326
 
324
327
  try {
325
328
  const doc = await db.get(rep_id);
326
329
  if (doc.stat < 3) throw "replication not ready";
327
- const json = await func.db.pouch[serviceP](SESSION_ID, data);
330
+ const json = {
331
+ code: 1,
332
+ data: await func.db.pouch[serviceP](SESSION_ID, data),
333
+ };
328
334
 
329
335
  return json;
330
336
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.479",
3
+ "version": "1.3.481",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {