@xuda.io/drive_module 1.1.1456 → 1.1.1457
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.
- package/index.mjs +10 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -281,10 +281,11 @@ export const get_drive_files = async (req) => {
|
|
|
281
281
|
const get_user_files = async () => {
|
|
282
282
|
opt.selector.docType = 'user_drive';
|
|
283
283
|
// opt.selector.uid = uid;
|
|
284
|
-
const ret = await find_contact_query(uid, opt);
|
|
285
|
-
const file_doc = await get_user_drive_file(uid, path.basename(file_path) || '/');
|
|
284
|
+
// const ret = await find_contact_query(uid, opt);
|
|
285
|
+
// const file_doc = await get_user_drive_file(uid, path.basename(file_path) || '/');
|
|
286
286
|
|
|
287
287
|
const app_id = await get_account_default_project_id(uid);
|
|
288
|
+
const ret = await db_module.find_app_couch_query(app_id, opt);
|
|
288
289
|
debugger;
|
|
289
290
|
return {
|
|
290
291
|
code: 1,
|
|
@@ -1443,10 +1444,17 @@ export const check_drive_file = async (req, job_id, headers, file_obj) => {
|
|
|
1443
1444
|
}
|
|
1444
1445
|
case 'user': {
|
|
1445
1446
|
selector.docType = 'user_drive';
|
|
1447
|
+
|
|
1446
1448
|
const user_drive_res = await find_contact_query(uid, {
|
|
1447
1449
|
selector,
|
|
1448
1450
|
limit: 99,
|
|
1449
1451
|
});
|
|
1452
|
+
const app_id = await get_account_default_project_id(uid);
|
|
1453
|
+
const workspace_drive_res = await db_module.find_app_couch_query(app_id, {
|
|
1454
|
+
selector,
|
|
1455
|
+
limit: 99,
|
|
1456
|
+
});
|
|
1457
|
+
|
|
1450
1458
|
if (user_drive_res.docs.length) {
|
|
1451
1459
|
return {
|
|
1452
1460
|
code: -764,
|