@xuda.io/drive_module 1.1.1013 → 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.
Files changed (2) hide show
  1. package/index.js +14 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -158,21 +158,22 @@ exports.get_drive_files = async function (req) {
158
158
  .filter((e) => !e.includes(":"))
159
159
  .filter((e) => e)
160
160
  .join(" ");
161
-
162
- tags_query.$or = [
163
- ...tags_query.$or,
164
- {
165
- ocr: {
166
- $regex: `(?i)${new_search}`,
161
+ if (mix_conditions) {
162
+ tags_query.$or = [
163
+ ...tags_query.$or,
164
+ {
165
+ ocr: {
166
+ $regex: `(?i)${new_search}`,
167
+ },
167
168
  },
168
- },
169
- {
170
- originalname: {
171
- $regex: `(?i)${new_search}`,
169
+ {
170
+ originalname: {
171
+ $regex: `(?i)${new_search}`,
172
+ },
172
173
  },
173
- },
174
- ];
175
- opt.selector = { ...opt.selector, ...tags_query };
174
+ ];
175
+ opt.selector = { ...opt.selector, ...tags_query };
176
+ }
176
177
  }
177
178
 
178
179
  if (tags?.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1013",
3
+ "version": "1.1.1014",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {