@xuda.io/drive_module 1.1.570 → 1.1.572

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 +5 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -41,6 +41,7 @@ const fs = require("fs");
41
41
  "update_drive_file_sharing_mode",
42
42
  "delete_file_bulk",
43
43
  "search_drive_files",
44
+ "check_drive_file",
44
45
  ].forEach((method) => {
45
46
  ["workspace", "studio", "user"].forEach((type) => {
46
47
  module.exports[method + "_" + type] = async function (
@@ -1473,8 +1474,8 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
1473
1474
  }
1474
1475
  case "user": {
1475
1476
  /// check existing file
1476
- const user_drive_res = await db_module.find_couch_query("drive", {
1477
- selector: { docType: "user_drive", originalname, stat: 3 },
1477
+ const user_drive_res = await db_module.find_couch_query("xuda_drive", {
1478
+ selector: { docType: "user_drive", originalname, uid, stat: 3 },
1478
1479
  limit: 99,
1479
1480
  });
1480
1481
  if (user_drive_res.docs.length) {
@@ -1575,8 +1576,8 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
1575
1576
  break;
1576
1577
  }
1577
1578
  case "user": {
1578
- const user_drive_res = await db_module.find_couch_query("drive", {
1579
- selector: { docType: "user_drive", originalname, stat: 3 },
1579
+ const user_drive_res = await db_module.find_couch_query("xuda_drive", {
1580
+ selector: { docType: "user_drive", originalname, uid, stat: 3 },
1580
1581
  limit: 99,
1581
1582
  });
1582
1583
  if (user_drive_res.docs.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.570",
3
+ "version": "1.1.572",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {