@xuda.io/drive_module 1.1.887 → 1.1.889

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 +6 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -91,8 +91,6 @@ exports.get_drive_files = async function (req) {
91
91
  uid,
92
92
  type,
93
93
  date,
94
- mime_type,
95
- file_ext,
96
94
  search_string,
97
95
  sort_by = "name",
98
96
  sort_dir = "desc",
@@ -117,7 +115,6 @@ exports.get_drive_files = async function (req) {
117
115
  }
118
116
 
119
117
  if (search_string) {
120
- // var og_search = ""
121
118
  tags_query = search_string
122
119
  .split(" ")
123
120
  .filter((e) => e.includes(":"))
@@ -133,6 +130,12 @@ exports.get_drive_files = async function (req) {
133
130
  if (tagKey === "name") {
134
131
  ret.$or.push({ originalname: { $regex: `(?i)${tagVal}` } });
135
132
  }
133
+ if (tagKey === "mime") {
134
+ ret.$or.push({ mime: { $regex: `(?i)${tagVal}` } });
135
+ }
136
+ if (tagKey === "ext") {
137
+ ret.$or.push({ file_ext: { $regex: `(?i)${tagVal}` } });
138
+ }
136
139
 
137
140
  return ret;
138
141
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.887",
3
+ "version": "1.1.889",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {