@xuda.io/drive_module 1.1.802 → 1.1.804

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 +21 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2776,3 +2776,24 @@ const get_drive_doc = async function (
2776
2776
 
2777
2777
  return doc;
2778
2778
  };
2779
+
2780
+ const save_drive_doc = async function (drive_type, app_id, uid, doc) {
2781
+ let save_ret;
2782
+
2783
+ switch (drive_type) {
2784
+ case "workspace":
2785
+ case "studio":
2786
+ const app_id_reference = await _common.get_project_app_id(app_id);
2787
+ save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
2788
+ break;
2789
+
2790
+ case "user":
2791
+ save_ret = await db_module.save_couch_doc("xuda_drive", doc);
2792
+ break;
2793
+
2794
+ default:
2795
+ break;
2796
+ }
2797
+
2798
+ return save_ret;
2799
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.802",
3
+ "version": "1.1.804",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {