@xuda.io/drive_module 1.1.845 → 1.1.846
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 +21 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1721,6 +1721,17 @@ exports.search_drive_files = async function (req) {
|
|
|
1721
1721
|
|
|
1722
1722
|
const sort_by_obj = { name: "originalname", date: "date_created" };
|
|
1723
1723
|
|
|
1724
|
+
search_string.split(" ").reduce((ret, val) => {
|
|
1725
|
+
var tagKey = val.split(":")[0];
|
|
1726
|
+
var tagVal = val.split(":")[1];
|
|
1727
|
+
|
|
1728
|
+
if (!ret[tagKey]) ret[tagKey] = [];
|
|
1729
|
+
|
|
1730
|
+
ret[tagKey].push({ $or: tagVal });
|
|
1731
|
+
|
|
1732
|
+
return ret;
|
|
1733
|
+
}, {});
|
|
1734
|
+
|
|
1724
1735
|
try {
|
|
1725
1736
|
validate_drive_type(drive_type);
|
|
1726
1737
|
|
|
@@ -2211,15 +2222,6 @@ const get_file_url = function (drive_type, file_name, ref) {
|
|
|
2211
2222
|
return file_url;
|
|
2212
2223
|
};
|
|
2213
2224
|
|
|
2214
|
-
setTimeout(async function () {
|
|
2215
|
-
// console.log(
|
|
2216
|
-
// await exports.search_drive_files({
|
|
2217
|
-
// app_id: "prj3937cb6f9a31c8c7dea25055bba845b1",
|
|
2218
|
-
// drive_type: "workspace",
|
|
2219
|
-
// })
|
|
2220
|
-
// );
|
|
2221
|
-
}, 2000);
|
|
2222
|
-
|
|
2223
2225
|
const get_drive_doc = async function (
|
|
2224
2226
|
type,
|
|
2225
2227
|
drive_type,
|
|
@@ -2342,3 +2344,13 @@ const save_drive_doc = async function (drive_type, app_id, doc) {
|
|
|
2342
2344
|
|
|
2343
2345
|
return save_ret;
|
|
2344
2346
|
};
|
|
2347
|
+
|
|
2348
|
+
setTimeout(async function () {
|
|
2349
|
+
console.log(
|
|
2350
|
+
await exports.search_drive_files({
|
|
2351
|
+
app_id: "prj3937cb6f9a31c8c7dea25055bba845b1",
|
|
2352
|
+
drive_type: "workspace",
|
|
2353
|
+
search_string: "tag:mediucal tag:school name:dw name:dawdddaw d",
|
|
2354
|
+
})
|
|
2355
|
+
);
|
|
2356
|
+
}, 2000);
|