@xuda.io/drive_module 1.1.1362 → 1.1.1364

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.mjs +4 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -277,7 +277,7 @@ export const get_drive_files = async (req) => {
277
277
  const get_user_files = async () => {
278
278
  opt.selector.docType = 'user_drive';
279
279
  opt.selector.uid = uid;
280
- const ret = await db_module.find_couch_query('xuda_drive', opt);
280
+ const ret = await find_contact_query(uid, opt);
281
281
  const file_doc = await get_user_drive_file(uid, path.basename(file_path) || '/');
282
282
  return {
283
283
  code: 1,
@@ -1314,7 +1314,7 @@ export const check_drive_file = async (req, job_id, headers, file_obj) => {
1314
1314
  }
1315
1315
  case 'user': {
1316
1316
  selector.docType = 'user_drive';
1317
- const user_drive_res = await db_module.find_couch_query('xuda_drive', {
1317
+ const user_drive_res = await find_contact_query(uid, {
1318
1318
  selector,
1319
1319
  limit: 99,
1320
1320
  });
@@ -2112,7 +2112,8 @@ export const save_user_drive_file = async function (uid, drive_doc) {
2112
2112
  };
2113
2113
 
2114
2114
  export const find_contact_query = async function (uid, opt) {
2115
- const app_id = await get_account_default_project_id(uid);
2115
+ const account_module = await import(`${module_path}/account_module/index.mjs`);
2116
+ const app_id = await account_module.get_account_default_project_id(uid);
2116
2117
  const ret = await db_module.find_app_couch_query(app_id, opt);
2117
2118
  return ret;
2118
2119
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1362",
3
+ "version": "1.1.1364",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {