@xuda.io/drive_module 1.1.900 → 1.1.902
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 +12 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -182,7 +182,12 @@ exports.get_drive_files = async function (req) {
|
|
|
182
182
|
else return (bytes / 1073741824).toFixed(2) + " GB";
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
const get_drive_files = async function (
|
|
185
|
+
const get_drive_files = async function (
|
|
186
|
+
ret,
|
|
187
|
+
file_doc,
|
|
188
|
+
app_id_reference,
|
|
189
|
+
uid
|
|
190
|
+
) {
|
|
186
191
|
let files = {
|
|
187
192
|
path: req.path || "/",
|
|
188
193
|
name: file_doc.data.folder_name || "/",
|
|
@@ -217,7 +222,8 @@ exports.get_drive_files = async function (req) {
|
|
|
217
222
|
const sizeInBytes = await get_folder_size(
|
|
218
223
|
req.path,
|
|
219
224
|
drive_type,
|
|
220
|
-
app_id_reference
|
|
225
|
+
app_id_reference,
|
|
226
|
+
uid
|
|
221
227
|
);
|
|
222
228
|
files.sizeInBytes += sizeInBytes;
|
|
223
229
|
files.children.push({
|
|
@@ -261,10 +267,10 @@ exports.get_drive_files = async function (req) {
|
|
|
261
267
|
|
|
262
268
|
const ret = await db_module.find_app_couch_query(app_id, opt);
|
|
263
269
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
270
|
+
const file_doc = await db_module.get_app_couch_doc(
|
|
271
|
+
app_id,
|
|
272
|
+
path.basename(req.path) || "/"
|
|
273
|
+
);
|
|
268
274
|
// // console.log(file_doc);
|
|
269
275
|
|
|
270
276
|
// let files = {
|