@xuda.io/drive_module 1.1.830 → 1.1.832

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.js +13 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -172,6 +172,7 @@ exports.get_drive_files = async function (req) {
172
172
  size: formatBytes(sizeInBytes),
173
173
  name: doc.folder_name,
174
174
  path: "/" + doc._id,
175
+ file_path: "/" + doc._id,
175
176
  type: doc.type,
176
177
  is_folder: true,
177
178
  date_created: doc.date_created,
@@ -251,6 +252,7 @@ exports.get_drive_files = async function (req) {
251
252
  size: formatBytes(sizeInBytes),
252
253
  name: doc.folder_name,
253
254
  path: "/" + doc._id,
255
+ file_path: "/" + doc._id,
254
256
  date_created: doc.date_created,
255
257
  });
256
258
  } catch (err) {
@@ -2590,11 +2592,18 @@ const get_folder_docs = async function (dir, drive_type, app_id) {
2590
2592
 
2591
2593
  exports.update_drive_file_tags = async function (req, job_id, headers) {
2592
2594
  try {
2593
- const { drive_type, app_id, uid, file_path, tags = [] } = req;
2595
+ const { type, drive_type, app_id, uid, file_path, tags = [] } = req;
2594
2596
  const file_name = path.basename(file_path);
2595
2597
  validate_drive_type(drive_type);
2596
2598
 
2597
- let doc = await get_drive_doc(drive_type, app_id, uid, file_path, headers);
2599
+ let doc = await get_drive_doc(
2600
+ type,
2601
+ drive_type,
2602
+ app_id,
2603
+ uid,
2604
+ file_path,
2605
+ headers
2606
+ );
2598
2607
 
2599
2608
  doc.date_modified = Date.now();
2600
2609
  doc.tags = tags;
@@ -2632,10 +2641,12 @@ setTimeout(async function () {
2632
2641
  }, 2000);
2633
2642
 
2634
2643
  const get_drive_doc = async function (
2644
+ type,
2635
2645
  drive_type,
2636
2646
  app_id,
2637
2647
  uid,
2638
2648
  file_path,
2649
+
2639
2650
  headers
2640
2651
  ) {
2641
2652
  let check_req = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.830",
3
+ "version": "1.1.832",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {