@xuda.io/drive_module 1.1.1125 → 1.1.1127

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 +26 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -122,10 +122,10 @@ exports.get_drive_files = async function (req) {
122
122
  .filter((e) => e)
123
123
  .join(' ');
124
124
 
125
- if (mix_conditions) {
126
- tags_query.$or = [
127
- ...tags_query.$or,
128
- {
125
+
126
+ if (new_search) {
127
+
128
+ opt.selector = { ...opt.selector, ...{
129
129
  ocr: {
130
130
  $regex: `(?i)${new_search}`,
131
131
  },
@@ -134,8 +134,28 @@ exports.get_drive_files = async function (req) {
134
134
  originalname: {
135
135
  $regex: `(?i)${new_search}`,
136
136
  },
137
- },
138
- ];
137
+ }, };
138
+
139
+ }
140
+
141
+
142
+
143
+ if (mix_conditions) {
144
+ if (new_search) {
145
+ tags_query.$or = [
146
+ ...tags_query.$or,
147
+ {
148
+ ocr: {
149
+ $regex: `(?i)${new_search}`,
150
+ },
151
+ },
152
+ {
153
+ originalname: {
154
+ $regex: `(?i)${new_search}`,
155
+ },
156
+ },
157
+ ];
158
+ }
139
159
  opt.selector = { ...opt.selector, ...tags_query };
140
160
  }
141
161
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1125",
3
+ "version": "1.1.1127",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {