@xuda.io/drive_module 1.1.1012 → 1.1.1014
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 +16 -14
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -133,8 +133,9 @@ exports.get_drive_files = async function (req) {
|
|
|
133
133
|
|
|
134
134
|
if (tagKey === "tag") {
|
|
135
135
|
tags.push(tagVal);
|
|
136
|
+
return;
|
|
136
137
|
}
|
|
137
|
-
|
|
138
|
+
mix_conditions = true;
|
|
138
139
|
if (tagKey === "name") {
|
|
139
140
|
ret.$or.push({ originalname: { $regex: `(?i)${tagVal}` } });
|
|
140
141
|
}
|
|
@@ -157,21 +158,22 @@ exports.get_drive_files = async function (req) {
|
|
|
157
158
|
.filter((e) => !e.includes(":"))
|
|
158
159
|
.filter((e) => e)
|
|
159
160
|
.join(" ");
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
if (mix_conditions) {
|
|
162
|
+
tags_query.$or = [
|
|
163
|
+
...tags_query.$or,
|
|
164
|
+
{
|
|
165
|
+
ocr: {
|
|
166
|
+
$regex: `(?i)${new_search}`,
|
|
167
|
+
},
|
|
166
168
|
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
{
|
|
170
|
+
originalname: {
|
|
171
|
+
$regex: `(?i)${new_search}`,
|
|
172
|
+
},
|
|
171
173
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
];
|
|
175
|
+
opt.selector = { ...opt.selector, ...tags_query };
|
|
176
|
+
}
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
if (tags?.length) {
|