@xuda.io/drive_module 1.1.737 → 1.1.739
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 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -229,6 +229,7 @@ exports.get_drive_files = async function (req) {
|
|
|
229
229
|
public: doc.public,
|
|
230
230
|
path: doc.file_path, // "/" + doc._id,
|
|
231
231
|
date_created: doc.date_created,
|
|
232
|
+
file_path: path.join(doc.file_path, doc.originalname),
|
|
232
233
|
});
|
|
233
234
|
} catch (err) {
|
|
234
235
|
console.error(err.message);
|
|
@@ -1916,6 +1917,8 @@ exports.search_drive_files = async function (req) {
|
|
|
1916
1917
|
file_ext,
|
|
1917
1918
|
type,
|
|
1918
1919
|
tags = [],
|
|
1920
|
+
sort_by = "date",
|
|
1921
|
+
sort_dir = "desc",
|
|
1919
1922
|
} = req;
|
|
1920
1923
|
|
|
1921
1924
|
let { limit = 100 } = req;
|