@xuda.io/drive_module 1.1.800 → 1.1.801
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 +18 -20
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1107,31 +1107,29 @@ exports.rename_drive_file = async function (req, job_id, headers) {
|
|
|
1107
1107
|
delete doc._rev;
|
|
1108
1108
|
}
|
|
1109
1109
|
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
doc.originalname = file_name_to;
|
|
1114
|
-
let save_ret;
|
|
1110
|
+
doc.date_modified = Date.now();
|
|
1111
|
+
doc.originalname = file_name_to;
|
|
1112
|
+
let save_ret;
|
|
1115
1113
|
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1114
|
+
switch (drive_type) {
|
|
1115
|
+
case "workspace":
|
|
1116
|
+
case "studio":
|
|
1117
|
+
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
1118
|
+
save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
|
|
1119
|
+
break;
|
|
1122
1120
|
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1121
|
+
case "user":
|
|
1122
|
+
save_ret = await db_module.save_couch_doc("xuda_drive", doc);
|
|
1123
|
+
break;
|
|
1126
1124
|
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1125
|
+
default:
|
|
1126
|
+
break;
|
|
1127
|
+
}
|
|
1130
1128
|
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
}
|
|
1129
|
+
if (save_ret.code < 0) {
|
|
1130
|
+
throw new Error(save_ret.data);
|
|
1134
1131
|
}
|
|
1132
|
+
|
|
1135
1133
|
return {
|
|
1136
1134
|
code: 200,
|
|
1137
1135
|
data: file_name_to,
|