@xuda.io/drive_module 1.1.1322 → 1.1.1323

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.
Files changed (2) hide show
  1. package/index.mjs +12 -1
  2. 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,16 @@ 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
+
679
+ if (tags) {
680
+ if (typeof tags === 'string') {
681
+ tags_arr = tags.split(',');
682
+ } else {
683
+ tags_arr = tags;
684
+ }
685
+ }
686
+
677
687
  let doc = {
678
688
  docType: `${drive_type}_drive`,
679
689
  stat: 3,
@@ -687,6 +697,7 @@ export const create_drive_folder = async (req, job_id, headers) => {
687
697
  type: 'directory',
688
698
  file_path,
689
699
  is_system,
700
+ tags: tags_arr,
690
701
  };
691
702
 
692
703
  let check_req = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1322",
3
+ "version": "1.1.1323",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {