@xuda.io/drive_module 1.1.881 → 1.1.882

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 +25 -25
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -87,17 +87,15 @@ exports.get_drive_files = async function (req) {
87
87
  try {
88
88
  let opt = {
89
89
  selector: {
90
- docType: "workspace_drive",
91
90
  stat: 3,
92
91
  type,
93
- file_path: req.path,
94
92
  },
95
93
  limit: to - from,
96
94
  skip: from,
97
95
  };
98
96
 
99
- if (type) {
100
- opt.selector.type = type;
97
+ if (req.path) {
98
+ opt.selector.file_path = req.path;
101
99
  }
102
100
 
103
101
  validate_drive_type(drive_type);
@@ -113,16 +111,16 @@ exports.get_drive_files = async function (req) {
113
111
  const app_id_reference = await _common.get_project_app_id(app_id);
114
112
  opt.selector = "workspace_drive";
115
113
 
116
- var opt = {
117
- selector: {
118
- docType: "workspace_drive",
119
- stat: 3,
120
- type,
121
- file_path: req.path,
122
- },
123
- limit: to - from,
124
- skip: from,
125
- };
114
+ // var opt = {
115
+ // selector: {
116
+ // docType: "workspace_drive",
117
+ // stat: 3,
118
+ // type,
119
+ // file_path: req.path,
120
+ // },
121
+ // limit: to - from,
122
+ // skip: from,
123
+ // };
126
124
 
127
125
  if (date) {
128
126
  opt.sort = [{ date_created: "desc" }];
@@ -193,17 +191,19 @@ exports.get_drive_files = async function (req) {
193
191
  return { code: 1, data: files };
194
192
  };
195
193
  const get_user_files = async function () {
196
- var opt = {
197
- selector: {
198
- docType: "user_drive",
199
- stat: 3,
200
- uid,
201
- type,
202
- file_path: req.path,
203
- },
204
- limit: to - from,
205
- skip: from,
206
- };
194
+ opt.selector = "user_drive";
195
+ opt.uid = uid;
196
+ // var opt = {
197
+ // selector: {
198
+ // docType: "user_drive",
199
+ // stat: 3,
200
+ // uid,
201
+ // type,
202
+ // file_path: req.path,
203
+ // },
204
+ // limit: to - from,
205
+ // skip: from,
206
+ // };
207
207
 
208
208
  if (date) {
209
209
  opt.sort = [{ date_created: "desc" }];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.881",
3
+ "version": "1.1.882",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {