@xuda.io/drive_module 1.1.571 → 1.1.573
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.
- package/index.js +5 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -44,6 +44,7 @@ const fs = require("fs");
|
|
|
44
44
|
"check_drive_file",
|
|
45
45
|
].forEach((method) => {
|
|
46
46
|
["workspace", "studio", "user"].forEach((type) => {
|
|
47
|
+
req.drive_type = type;
|
|
47
48
|
module.exports[method + "_" + type] = async function (
|
|
48
49
|
req,
|
|
49
50
|
job_id,
|
|
@@ -1474,8 +1475,8 @@ exports.upload_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1474
1475
|
}
|
|
1475
1476
|
case "user": {
|
|
1476
1477
|
/// check existing file
|
|
1477
|
-
const user_drive_res = await db_module.find_couch_query("
|
|
1478
|
-
selector: { docType: "user_drive", originalname, stat: 3 },
|
|
1478
|
+
const user_drive_res = await db_module.find_couch_query("xuda_drive", {
|
|
1479
|
+
selector: { docType: "user_drive", originalname, uid, stat: 3 },
|
|
1479
1480
|
limit: 99,
|
|
1480
1481
|
});
|
|
1481
1482
|
if (user_drive_res.docs.length) {
|
|
@@ -1576,8 +1577,8 @@ exports.check_drive_file = async function (req, job_id, headers, file_obj) {
|
|
|
1576
1577
|
break;
|
|
1577
1578
|
}
|
|
1578
1579
|
case "user": {
|
|
1579
|
-
const user_drive_res = await db_module.find_couch_query("
|
|
1580
|
-
selector: { docType: "user_drive", originalname, stat: 3 },
|
|
1580
|
+
const user_drive_res = await db_module.find_couch_query("xuda_drive", {
|
|
1581
|
+
selector: { docType: "user_drive", originalname, uid, stat: 3 },
|
|
1581
1582
|
limit: 99,
|
|
1582
1583
|
});
|
|
1583
1584
|
if (user_drive_res.docs.length) {
|