@xuda.io/drive_module 1.1.1322 → 1.1.1324
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 +11 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -665,7 +665,7 @@ export const update_drive_file = async (req, job_id, headers, file_obj) => {
|
|
|
665
665
|
|
|
666
666
|
export const create_drive_folder = async (req, job_id, headers) => {
|
|
667
667
|
try {
|
|
668
|
-
const { drive_type, app_id, folder_name, uid, is_system, path: file_path } = req;
|
|
668
|
+
const { drive_type, app_id, folder_name, tags, uid, is_system, path: file_path } = req;
|
|
669
669
|
validate_drive_type(drive_type);
|
|
670
670
|
|
|
671
671
|
let folder_id;
|
|
@@ -674,6 +674,15 @@ export const create_drive_folder = async (req, job_id, headers) => {
|
|
|
674
674
|
let folder_exist;
|
|
675
675
|
let save_ret;
|
|
676
676
|
|
|
677
|
+
let tags_arr = [];
|
|
678
|
+
if (tags) {
|
|
679
|
+
if (typeof tags === 'string') {
|
|
680
|
+
tags_arr = tags.split(',');
|
|
681
|
+
} else {
|
|
682
|
+
tags_arr = tags;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
677
686
|
let doc = {
|
|
678
687
|
docType: `${drive_type}_drive`,
|
|
679
688
|
stat: 3,
|
|
@@ -687,6 +696,7 @@ export const create_drive_folder = async (req, job_id, headers) => {
|
|
|
687
696
|
type: 'directory',
|
|
688
697
|
file_path,
|
|
689
698
|
is_system,
|
|
699
|
+
tags: tags_arr,
|
|
690
700
|
};
|
|
691
701
|
|
|
692
702
|
let check_req = {
|