@xuda.io/account_module 1.2.1296 → 1.2.1298

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
@@ -2885,7 +2885,7 @@ export const create_account_profile = async function (req, job_id, headers) {
2885
2885
  const { uid, profile_name, profile_signature, profile_email, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj, main } = req;
2886
2886
  try {
2887
2887
  const app_id = await get_account_default_project_id(uid);
2888
- const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
2888
+ // const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
2889
2889
 
2890
2890
  const d = Date.now();
2891
2891
  const doc = {
@@ -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');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1296",
3
+ "version": "1.2.1298",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {