@xuda.io/drive_module 1.1.556 → 1.1.557

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 +11 -15
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1477,21 +1477,17 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1477
1477
  break;
1478
1478
  }
1479
1479
  case "user": {
1480
- if (check_exist) {
1481
- const workspace_drive_res = await db_module.find_couch_query(
1482
- "drive",
1483
- {
1484
- selector: { docType: "user_drive", originalname, stat: 3 },
1485
- limit: 99,
1486
- }
1487
- );
1488
- if (workspace_drive_res.docs.length) {
1489
- return {
1490
- code: -762,
1491
- data: "file already exist",
1492
- duplicates: workspace_drive_res.docs,
1493
- };
1494
- }
1480
+ /// check existing file
1481
+ const user_drive_res = await db_module.find_couch_query("drive", {
1482
+ selector: { docType: "user_drive", originalname, stat: 3 },
1483
+ limit: 99,
1484
+ });
1485
+ if (workspace_drive_res.docs.length) {
1486
+ return {
1487
+ code: -762,
1488
+ data: "file already exist",
1489
+ duplicates: workspace_drive_res.docs,
1490
+ };
1495
1491
  }
1496
1492
 
1497
1493
  ref = uid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.556",
3
+ "version": "1.1.557",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {