@xuda.io/drive_module 1.1.738 → 1.1.740

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 +3 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1917,6 +1917,8 @@ exports.search_drive_files = async function (req) {
1917
1917
  file_ext,
1918
1918
  type,
1919
1919
  tags = [],
1920
+ sort_by = "date",
1921
+ sort_dir = "desc",
1920
1922
  } = req;
1921
1923
 
1922
1924
  let { limit = 100 } = req;
@@ -2004,6 +2006,7 @@ exports.search_drive_files = async function (req) {
2004
2006
  "mime",
2005
2007
  "size",
2006
2008
  ],
2009
+ sort: { [sort_by]: sort_dir },
2007
2010
  };
2008
2011
 
2009
2012
  const alias_results = (docs) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.738",
3
+ "version": "1.1.740",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {