@xuda.io/drive_module 1.1.460 → 1.1.461
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 +11 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -509,16 +509,21 @@ exports.delete_drive_files = async function (req) {
|
|
|
509
509
|
case "workspace": {
|
|
510
510
|
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
511
511
|
|
|
512
|
-
const docs = await get_folder_docs(
|
|
513
|
-
path.basename(file.path),
|
|
514
|
-
drive_type,
|
|
515
|
-
app_id_reference
|
|
516
|
-
);
|
|
517
|
-
|
|
518
512
|
doc_ret = await db_module.get_app_couch_doc(
|
|
519
513
|
app_id_reference,
|
|
520
514
|
path.basename(file.path)
|
|
521
515
|
);
|
|
516
|
+
|
|
517
|
+
let arr = [];
|
|
518
|
+
if (doc_ret.data.type === "file") {
|
|
519
|
+
} else {
|
|
520
|
+
arr = await get_folder_docs(
|
|
521
|
+
path.basename(file.path),
|
|
522
|
+
drive_type,
|
|
523
|
+
app_id_reference
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
|
|
522
527
|
await module.exports.delete_file_from_bucket(doc_ret.data.bucket);
|
|
523
528
|
doc_ret.data.ts = Date.now();
|
|
524
529
|
doc_ret.data.stat = 4;
|