@xuda.io/drive_module 1.1.1251 → 1.1.1253

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.mjs +6 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -678,6 +678,11 @@ export const create_drive_folder = async (req, job_id, headers) => {
678
678
  type: doc.type,
679
679
  };
680
680
  const check_existing_file_ret = await check_drive_file(check_req);
681
+
682
+ if (check_existing_file_ret.code < 0) {
683
+ throw new Error(check_existing_file_ret.data);
684
+ }
685
+
681
686
  debugger;
682
687
  switch (drive_type) {
683
688
  case 'studio': {
@@ -1114,7 +1119,7 @@ export const upload_drive_file = async (req, job_id, headers, file_obj) => {
1114
1119
  if (await fs_module.file_exists(target_file)) {
1115
1120
  return {
1116
1121
  code: -762,
1117
- data: 'file already exist',
1122
+ data: `${type} exist`,
1118
1123
  };
1119
1124
  }
1120
1125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1251",
3
+ "version": "1.1.1253",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {