@xuda.io/drive_module 1.1.1352 → 1.1.1354

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 +6 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1764,7 +1764,7 @@ const get_drive_doc = async (type, drive_type, app_id, uid, file_path, headers)
1764
1764
  break;
1765
1765
  }
1766
1766
  case 'user':
1767
- doc_ret = await db_module.get_couch_doc('xuda_drive', check_existing_file_ret.duplicates[0]._id);
1767
+ doc_ret = await get_user_drive_file(uid, check_existing_file_ret.duplicates[0]._id);
1768
1768
  break;
1769
1769
 
1770
1770
  case 'workspace': {
@@ -1834,7 +1834,7 @@ const save_drive_doc = async (drive_type, app_id, doc) => {
1834
1834
  break;
1835
1835
 
1836
1836
  case 'user':
1837
- save_ret = await db_module.save_couch_doc('xuda_drive', doc);
1837
+ save_ret = await save_user_drive_file(uid, doc);
1838
1838
  break;
1839
1839
 
1840
1840
  default:
@@ -2097,17 +2097,17 @@ export const getExtensionFromUrl = function (imageUrl) {
2097
2097
  }
2098
2098
  };
2099
2099
 
2100
- export const get_user_drive_file = async function (uid, contact_id) {
2100
+ export const get_user_drive_file = async function (uid, filename) {
2101
2101
  const account_module = await import(`${module_path}/account_module/index.mjs`);
2102
2102
  const app_id = await account_module.get_account_default_project_id(uid);
2103
- const contact_ret = await db_module.get_app_couch_doc_native(app_id, contact_id);
2103
+ const contact_ret = await db_module.get_app_couch_doc(app_id, filename);
2104
2104
  return contact_ret;
2105
2105
  };
2106
2106
 
2107
- export const save_user_drive_file = async function (uid, contact_doc) {
2107
+ export const save_user_drive_file = async function (uid, drive_doc) {
2108
2108
  const account_module = await import(`${module_path}/account_module/index.mjs`);
2109
2109
  const app_id = await account_module.get_account_default_project_id(uid);
2110
- const contact_ret = await db_module.save_app_couch_doc(app_id, contact_doc);
2110
+ const contact_ret = await db_module.save_app_couch_doc(app_id, drive_doc);
2111
2111
  return contact_ret;
2112
2112
  };
2113
2113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1352",
3
+ "version": "1.1.1354",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {