@xuda.io/drive_module 1.1.1020 → 1.1.1022
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
|
@@ -220,7 +220,7 @@ exports.get_drive_files = async function (req) {
|
|
|
220
220
|
path: doc.file_path,
|
|
221
221
|
date_created: doc.date_created,
|
|
222
222
|
file_path: path.join(doc.file_path, doc.originalname),
|
|
223
|
-
tags: doc.tags,
|
|
223
|
+
tags: doc.tags || [],
|
|
224
224
|
});
|
|
225
225
|
} catch (err) {
|
|
226
226
|
console.error(err.message);
|
|
@@ -244,7 +244,7 @@ exports.get_drive_files = async function (req) {
|
|
|
244
244
|
type: doc.type,
|
|
245
245
|
is_folder: true,
|
|
246
246
|
date_created: doc.date_created,
|
|
247
|
-
tags: doc.tags,
|
|
247
|
+
tags: doc.tags || [],
|
|
248
248
|
});
|
|
249
249
|
} catch (err) {
|
|
250
250
|
console.error(err.message);
|
|
@@ -300,10 +300,15 @@ exports.get_drive_files = async function (req) {
|
|
|
300
300
|
|
|
301
301
|
const app_id_master = await _common.get_project_app_id(app_id, true);
|
|
302
302
|
|
|
303
|
-
var directoryPath =
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
var directoryPath = path.join(
|
|
304
|
+
_conf.studio_drive_path,
|
|
305
|
+
app_id_master,
|
|
306
|
+
req.path || "/"
|
|
307
|
+
);
|
|
308
|
+
// var directoryPath =
|
|
309
|
+
// req.path !== "/"
|
|
310
|
+
// ? req.path || "/"
|
|
311
|
+
// : path.join(_conf.studio_drive_path, app_id_master);
|
|
307
312
|
|
|
308
313
|
const options = {
|
|
309
314
|
stat: true,
|