@xuda.io/drive_module 1.1.496 → 1.1.498
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 +4 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1856,7 +1856,7 @@ exports.search_drive_files = async function (req) {
|
|
|
1856
1856
|
exports.get_drive_size = async function (req) {
|
|
1857
1857
|
try {
|
|
1858
1858
|
const { drive_type, app_id, uid } = req;
|
|
1859
|
-
|
|
1859
|
+
let size = 0;
|
|
1860
1860
|
// validate_drive_type(drive_type);
|
|
1861
1861
|
|
|
1862
1862
|
var ref;
|
|
@@ -1875,13 +1875,14 @@ exports.get_drive_size = async function (req) {
|
|
|
1875
1875
|
switch (drive_type) {
|
|
1876
1876
|
case "user":
|
|
1877
1877
|
break;
|
|
1878
|
+
case "workspace":
|
|
1879
|
+
break;
|
|
1878
1880
|
|
|
1879
1881
|
default:
|
|
1882
|
+
size = await get_folder_size(directoryPath, drive_type, app_id);
|
|
1880
1883
|
break;
|
|
1881
1884
|
}
|
|
1882
1885
|
|
|
1883
|
-
const size = await get_folder_size(directoryPath, drive_type, app_id);
|
|
1884
|
-
|
|
1885
1886
|
return { code: 200, data: size };
|
|
1886
1887
|
} catch (err) {
|
|
1887
1888
|
return { code: -200, data: err.message };
|