@xuda.io/drive_module 1.1.1357 → 1.1.1359
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.mjs +4 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -278,7 +278,7 @@ export const get_drive_files = async (req) => {
|
|
|
278
278
|
opt.selector.docType = 'user_drive';
|
|
279
279
|
opt.selector.uid = uid;
|
|
280
280
|
const ret = await db_module.find_couch_query('xuda_drive', opt);
|
|
281
|
-
const file_doc = await
|
|
281
|
+
const file_doc = await get_user_drive_file(uid, path.basename(file_path) || '/');
|
|
282
282
|
return {
|
|
283
283
|
code: 1,
|
|
284
284
|
data: await fetch_drive_files(ret, file_doc, null, uid),
|
|
@@ -637,7 +637,7 @@ export const update_drive_file = async (req, job_id, headers, file_obj) => {
|
|
|
637
637
|
case 'user': {
|
|
638
638
|
ref = uid;
|
|
639
639
|
doc.bucket[`${process.env.XUDA_HOSTNAME}`] = await upload_file_to_spaces(tempPath, uid, drive_type, file_name);
|
|
640
|
-
save_ret = await
|
|
640
|
+
save_ret = await save_user_drive_file(uid, doc);
|
|
641
641
|
break;
|
|
642
642
|
}
|
|
643
643
|
default:
|
|
@@ -753,7 +753,7 @@ export const create_drive_folder = async (req, job_id, headers) => {
|
|
|
753
753
|
case 'user': {
|
|
754
754
|
folder_id = 'drive_folder_' + _utils.UUID();
|
|
755
755
|
doc._id = folder_id;
|
|
756
|
-
save_ret = await
|
|
756
|
+
save_ret = await save_user_drive_file(uid, doc);
|
|
757
757
|
break;
|
|
758
758
|
}
|
|
759
759
|
default:
|
|
@@ -806,7 +806,7 @@ export const rename_drive_file = async (req, job_id, headers) => {
|
|
|
806
806
|
break;
|
|
807
807
|
|
|
808
808
|
case 'user':
|
|
809
|
-
save_ret = await
|
|
809
|
+
save_ret = await save_user_drive_file(uid, doc);
|
|
810
810
|
break;
|
|
811
811
|
|
|
812
812
|
default:
|