@xuda.io/drive_module 1.1.804 → 1.1.806

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 +6 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1281,7 +1281,7 @@ exports.update_drive_file_sharing_mode = async function (req, job_id, headers) {
1281
1281
  break;
1282
1282
  }
1283
1283
 
1284
- return save_ret;
1284
+ return await save_drive_doc(drive_type, app_id, doc);
1285
1285
  } catch (err) {
1286
1286
  return err.message;
1287
1287
  }
@@ -2777,7 +2777,7 @@ const get_drive_doc = async function (
2777
2777
  return doc;
2778
2778
  };
2779
2779
 
2780
- const save_drive_doc = async function (drive_type, app_id, uid, doc) {
2780
+ const save_drive_doc = async function (drive_type, app_id, doc) {
2781
2781
  let save_ret;
2782
2782
 
2783
2783
  switch (drive_type) {
@@ -2795,5 +2795,9 @@ const save_drive_doc = async function (drive_type, app_id, uid, doc) {
2795
2795
  break;
2796
2796
  }
2797
2797
 
2798
+ if (save_ret.code < 0) {
2799
+ throw new Error(save_ret.data);
2800
+ }
2801
+
2798
2802
  return save_ret;
2799
2803
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.804",
3
+ "version": "1.1.806",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {