@xuda.io/drive_module 1.1.679 → 1.1.681

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 +6 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1987,19 +1987,22 @@ exports.search_drive_files = async function (req) {
1987
1987
 
1988
1988
  const alias_results = (docs) => {
1989
1989
  return docs.map((doc) => {
1990
+ console.log(doc);
1990
1991
  return {
1991
1992
  name: doc.originalname,
1992
1993
  path: doc.server_file_name,
1993
1994
  type: doc.is_folder ? "directory" : "file", //type ||
1994
- file_url: get_file_url(drive_type, doc.server_file_name),
1995
+ file_url: get_file_url(drive_type, doc.server_file_name, ref),
1995
1996
  mime: doc.mime,
1996
1997
  file_ext: doc.file_ext.substr(1),
1997
1998
  };
1998
1999
  });
1999
2000
  };
2000
2001
 
2002
+ var ref;
2001
2003
  switch (drive_type) {
2002
2004
  case "workspace": {
2005
+ ref = app_id;
2003
2006
  const app_id_reference = await _common.get_project_app_id(app_id);
2004
2007
  search_results = alias_results(
2005
2008
  (await db_module.find_app_couch_query(app_id_reference, opt)).docs
@@ -2008,6 +2011,7 @@ exports.search_drive_files = async function (req) {
2008
2011
  }
2009
2012
 
2010
2013
  case "user": {
2014
+ ref = uid;
2011
2015
  search_results = alias_results(
2012
2016
  (await db_module.find_couch_query("xuda_drive", opt)).docs
2013
2017
  );
@@ -2015,6 +2019,7 @@ exports.search_drive_files = async function (req) {
2015
2019
  }
2016
2020
 
2017
2021
  case "studio": {
2022
+ ref = app_id;
2018
2023
  const directoryPath = path.join(_conf[`studio_drive_path`], app_id);
2019
2024
 
2020
2025
  const options = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.679",
3
+ "version": "1.1.681",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {