@xuda.io/drive_module 1.1.784 → 1.1.786

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 +10 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2589,6 +2589,7 @@ const get_drive_doc = async function (
2589
2589
 
2590
2590
  if (doc_ret.code < 0) {
2591
2591
  if (drive_type === "studio") {
2592
+ const app_id_reference = await _common.get_project_app_id(app_id);
2592
2593
  const file_name = path.basename(file_path);
2593
2594
  const ext = path.extname(file_name).toLowerCase();
2594
2595
  doc = {
@@ -2606,7 +2607,16 @@ const get_drive_doc = async function (
2606
2607
  drive_type,
2607
2608
  app_id: await _common.get_project_app_id(app_id),
2608
2609
  app_id_reference: await _common.get_project_app_id(app_id, true),
2610
+ uid,
2609
2611
  };
2612
+ const save_ret = await db_module.save_app_couch_doc(
2613
+ app_id_reference,
2614
+ doc
2615
+ );
2616
+ if (save_ret.code < 0) {
2617
+ throw new Error("studio file doc save error");
2618
+ }
2619
+ doc._rev = save_ret.data.rev;
2610
2620
  } else {
2611
2621
  throw new Error("file doc not found");
2612
2622
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.784",
3
+ "version": "1.1.786",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {