@xuda.io/drive_module 1.1.901 → 1.1.903
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 -3
- 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({
|
|
@@ -322,7 +328,10 @@ exports.get_drive_files = async function (req) {
|
|
|
322
328
|
// }
|
|
323
329
|
// files.size = formatBytes(files.sizeInBytes);
|
|
324
330
|
|
|
325
|
-
return {
|
|
331
|
+
return {
|
|
332
|
+
code: 1,
|
|
333
|
+
data: await get_drive_files(ret, file_doc, app_id_reference, null),
|
|
334
|
+
};
|
|
326
335
|
};
|
|
327
336
|
const get_user_files = async function () {
|
|
328
337
|
opt.selector.docType = "user_drive";
|