@xuda.io/drive_module 1.1.880 → 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 +28 -23
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -87,15 +87,17 @@ 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
 
97
+ if (req.path) {
98
+ opt.selector.file_path = req.path;
99
+ }
100
+
99
101
  validate_drive_type(drive_type);
100
102
 
101
103
  function formatBytes(bytes) {
@@ -108,16 +110,17 @@ exports.get_drive_files = async function (req) {
108
110
  const get_workspace_files = async function () {
109
111
  const app_id_reference = await _common.get_project_app_id(app_id);
110
112
  opt.selector = "workspace_drive";
111
- var opt = {
112
- selector: {
113
- docType: "workspace_drive",
114
- stat: 3,
115
- type,
116
- file_path: req.path,
117
- },
118
- limit: to - from,
119
- skip: from,
120
- };
113
+
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
+ // };
121
124
 
122
125
  if (date) {
123
126
  opt.sort = [{ date_created: "desc" }];
@@ -188,17 +191,19 @@ exports.get_drive_files = async function (req) {
188
191
  return { code: 1, data: files };
189
192
  };
190
193
  const get_user_files = async function () {
191
- var opt = {
192
- selector: {
193
- docType: "user_drive",
194
- stat: 3,
195
- uid,
196
- type,
197
- file_path: req.path,
198
- },
199
- limit: to - from,
200
- skip: from,
201
- };
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
+ // };
202
207
 
203
208
  if (date) {
204
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.880",
3
+ "version": "1.1.882",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {