@xuda.io/account_module 1.2.1297 → 1.2.1299

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 +3 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2917,9 +2917,10 @@ export const create_account_profile = async function (req, job_id, headers) {
2917
2917
 
2918
2918
  export const update_account_profile = async function (req, job_id, headers) {
2919
2919
  const { uid, _id } = req;
2920
+ const app_id = await get_account_default_project_id(uid);
2920
2921
  const account_profile_properties = ['profile_name', 'profile_signature', 'profile_email', 'profile_picture', 'profile_avatar', 'profile_picture_obj', 'profile_avatar_obj', 'auto_respond', 'auto_respond_mode', 'auto_respond_agents'];
2921
2922
  try {
2922
- let { data: account_profile_doc } = await db_module.get_couch_doc('xuda_accounts', _id);
2923
+ let { data: account_profile_doc } = await db_module.get_app_couch_doc(app_id, _id);
2923
2924
 
2924
2925
  if (account_profile_doc.docType !== 'account_profile') {
2925
2926
  throw new Error('not account profile doc');
@@ -2943,7 +2944,7 @@ export const update_account_profile = async function (req, job_id, headers) {
2943
2944
 
2944
2945
  account_profile_doc.ts = Date.now();
2945
2946
 
2946
- const save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
2947
+ const save_ret = await db_module.save_app_couch_doc(app_id, account_profile_doc);
2947
2948
 
2948
2949
  return { code: 56, data: save_ret };
2949
2950
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1297",
3
+ "version": "1.2.1299",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {