@xuda.io/drive_module 1.1.761 → 1.1.763

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.
Files changed (2) hide show
  1. package/index.js +8 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1158,14 +1158,14 @@ exports.update_drive_file_sharing_mode = async function (req, job_id, headers) {
1158
1158
  let doc_ret;
1159
1159
 
1160
1160
  switch (drive_type) {
1161
- case "studio":
1161
+ case "studio": {
1162
1162
  const app_id_reference = await _common.get_project_app_id(app_id);
1163
1163
  doc_ret = await db_module.get_app_couch_doc(
1164
1164
  app_id_reference,
1165
1165
  file_path
1166
1166
  );
1167
1167
  break;
1168
-
1168
+ }
1169
1169
  case "user":
1170
1170
  doc_ret = await db_module.get_couch_doc(
1171
1171
  "xuda_drive",
@@ -1173,7 +1173,7 @@ exports.update_drive_file_sharing_mode = async function (req, job_id, headers) {
1173
1173
  );
1174
1174
  break;
1175
1175
 
1176
- case "workspace":
1176
+ case "workspace": {
1177
1177
  const app_id_reference = await _common.get_project_app_id(app_id);
1178
1178
  doc_ret = await db_module.get_app_couch_doc(
1179
1179
  app_id_reference,
@@ -1181,7 +1181,7 @@ exports.update_drive_file_sharing_mode = async function (req, job_id, headers) {
1181
1181
  );
1182
1182
 
1183
1183
  break;
1184
-
1184
+ }
1185
1185
  default:
1186
1186
  break;
1187
1187
  }
@@ -1189,13 +1189,13 @@ exports.update_drive_file_sharing_mode = async function (req, job_id, headers) {
1189
1189
  var doc = doc_ret.data;
1190
1190
 
1191
1191
  if (doc_ret.code < 0) {
1192
- const ext = path.extname(file_id).toLowerCase();
1192
+ const ext = path.extname(file_name).toLowerCase();
1193
1193
  doc = {
1194
- _id: file_id,
1194
+ _id: file_name,
1195
1195
  docType: `${drive_type}_drive`,
1196
1196
  stat: 3,
1197
- server_file_name: file_id,
1198
- originalname: file_id,
1197
+ server_file_name: file_name,
1198
+ originalname: file_name,
1199
1199
  uid,
1200
1200
  date_created: Date.now(),
1201
1201
  ip: headers["cf-connecting-ip"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.761",
3
+ "version": "1.1.763",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {