@xuda.io/drive_module 1.1.995 → 1.1.997
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 +8 -22
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -814,30 +814,16 @@ exports.delete_drive_files = async function (req, job_id, headers) {
|
|
|
814
814
|
|
|
815
815
|
switch (drive_type) {
|
|
816
816
|
case "studio": {
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
path.basename(file.path)
|
|
821
|
-
);
|
|
822
|
-
|
|
823
|
-
const ret = rimraf.sync(file.path); // delete the file
|
|
824
|
-
if (doc_ret.code > -1) {
|
|
825
|
-
if (doc_ret.data.type === "directory") {
|
|
826
|
-
const docs = await get_folder_docs(
|
|
827
|
-
path.basename(file.path),
|
|
828
|
-
drive_type,
|
|
829
|
-
app_id_master
|
|
830
|
-
);
|
|
831
|
-
for await (let doc of docs) {
|
|
832
|
-
doc._deleted = true;
|
|
833
|
-
await db_module.save_app_couch_doc(app_id_master, doc);
|
|
834
|
-
}
|
|
835
|
-
}
|
|
817
|
+
debugger;
|
|
818
|
+
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
819
|
+
const ret = rimraf.sync(file.file_path); // delete the file
|
|
836
820
|
|
|
837
|
-
|
|
821
|
+
if (doc.type === "file") {
|
|
822
|
+
doc.ts = Date.now();
|
|
823
|
+
doc.stat = 4;
|
|
838
824
|
save_ret = await db_module.save_app_couch_doc(
|
|
839
|
-
|
|
840
|
-
|
|
825
|
+
app_id_reference,
|
|
826
|
+
doc
|
|
841
827
|
);
|
|
842
828
|
}
|
|
843
829
|
|