@xuda.io/drive_module 1.1.763 → 1.1.764
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 -15
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1139,7 +1139,7 @@ exports.rename_drive_folder = async function (req) {
|
|
|
1139
1139
|
};
|
|
1140
1140
|
exports.update_drive_file_sharing_mode = async function (req, job_id, headers) {
|
|
1141
1141
|
try {
|
|
1142
|
-
const { drive_type, uid, app_id,
|
|
1142
|
+
const { drive_type, uid, app_id, is_public } = req;
|
|
1143
1143
|
|
|
1144
1144
|
validate_drive_type(drive_type);
|
|
1145
1145
|
|
|
@@ -1188,7 +1188,7 @@ exports.update_drive_file_sharing_mode = async function (req, job_id, headers) {
|
|
|
1188
1188
|
|
|
1189
1189
|
var doc = doc_ret.data;
|
|
1190
1190
|
|
|
1191
|
-
if (doc_ret.code < 0) {
|
|
1191
|
+
if (doc_ret.code < 0 && drive_type === "studio") {
|
|
1192
1192
|
const ext = path.extname(file_name).toLowerCase();
|
|
1193
1193
|
doc = {
|
|
1194
1194
|
_id: file_name,
|
|
@@ -1212,21 +1212,24 @@ exports.update_drive_file_sharing_mode = async function (req, job_id, headers) {
|
|
|
1212
1212
|
|
|
1213
1213
|
let save_ret;
|
|
1214
1214
|
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
case "studio":
|
|
1218
|
-
const app_id_reference = await _common.get_project_app_id(app_id);
|
|
1219
|
-
save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
|
|
1220
|
-
break;
|
|
1215
|
+
// const app_id_reference = await _common.get_project_app_id(app_id);
|
|
1216
|
+
// save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
|
|
1221
1217
|
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1218
|
+
// switch (drive_type) {
|
|
1219
|
+
// case "workspace":
|
|
1220
|
+
// case "studio":
|
|
1221
|
+
// const app_id_reference = await _common.get_project_app_id(app_id);
|
|
1222
|
+
// save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
|
|
1223
|
+
// break;
|
|
1225
1224
|
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1225
|
+
// case "user":
|
|
1226
|
+
// save_ret = await db_module.save_couch_doc("xuda_drive", doc);
|
|
1227
|
+
// break;
|
|
1228
|
+
|
|
1229
|
+
// default:
|
|
1230
|
+
// break;
|
|
1231
|
+
// }
|
|
1232
|
+
// return save_ret;
|
|
1230
1233
|
}
|
|
1231
1234
|
|
|
1232
1235
|
doc.ts = Date.now();
|