@xuda.io/drive_module 1.1.1319 → 1.1.1320

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 +5 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -483,7 +483,7 @@ export const delete_drive_files = async (req, job_id, headers) => {
483
483
  for await (const file of files_arr) {
484
484
  let doc = await get_drive_doc(file.type, drive_type, app_id, uid, file.file_path, headers);
485
485
 
486
- if (doc.is_protected) {
486
+ if (doc.is_system) {
487
487
  throw new Error(`${doc.type} protected`);
488
488
  }
489
489
 
@@ -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_protected, path: file_path } = req;
668
+ const { drive_type, app_id, folder_name, uid, is_system, path: file_path } = req;
669
669
  validate_drive_type(drive_type);
670
670
 
671
671
  let folder_id;
@@ -686,7 +686,7 @@ export const create_drive_folder = async (req, job_id, headers) => {
686
686
  is_folder: true,
687
687
  type: 'directory',
688
688
  file_path,
689
- is_protected,
689
+ is_system,
690
690
  };
691
691
 
692
692
  let check_req = {
@@ -1050,7 +1050,7 @@ export const delete_file_bulk = async (req) => {
1050
1050
 
1051
1051
  export const upload_drive_file = async (req, job_id, headers, file_obj) => {
1052
1052
  try {
1053
- const { drive_type, app_id, uid, make_public, tags = '', is_protected, path: file_path } = req;
1053
+ const { drive_type, app_id, uid, make_public, tags = '', is_system, path: file_path } = req;
1054
1054
 
1055
1055
  /// validations
1056
1056
  validate_drive_type(drive_type);
@@ -1097,7 +1097,7 @@ export const upload_drive_file = async (req, job_id, headers, file_obj) => {
1097
1097
  size: stat.isFile() ? stat.size : 0,
1098
1098
  public: make_public,
1099
1099
  tags: tags_arr,
1100
- is_protected,
1100
+ is_system,
1101
1101
  };
1102
1102
  doc = { ...doc, ...(await get_file_info(tempPath)) };
1103
1103
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1319",
3
+ "version": "1.1.1320",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {