@xuda.io/drive_module 1.1.750 → 1.1.752
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.
- package/index.js +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1923,6 +1923,8 @@ exports.search_drive_files = async function (req) {
|
|
|
1923
1923
|
|
|
1924
1924
|
let { limit = 100 } = req;
|
|
1925
1925
|
|
|
1926
|
+
const sort_by_obj = { name: originalname, date: date_created };
|
|
1927
|
+
|
|
1926
1928
|
try {
|
|
1927
1929
|
validate_drive_type(drive_type);
|
|
1928
1930
|
|
|
@@ -2006,7 +2008,7 @@ exports.search_drive_files = async function (req) {
|
|
|
2006
2008
|
"mime",
|
|
2007
2009
|
"size",
|
|
2008
2010
|
],
|
|
2009
|
-
sort: [{ [sort_by]: sort_dir }],
|
|
2011
|
+
sort: [{ [sort_by_obj[sort_by]]: sort_dir }],
|
|
2010
2012
|
};
|
|
2011
2013
|
|
|
2012
2014
|
console.log("opt", opt);
|