@xuda.io/account_module 1.2.1092 → 1.2.1094

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
@@ -2474,15 +2474,15 @@ export const update_account_profile = async function (req, job_id, headers) {
2474
2474
  const { uid } = req;
2475
2475
  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'];
2476
2476
  try {
2477
- let { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
2477
+ let { data: account_profile_doc } = await db_module.get_couch_doc('xuda_accounts', uid);
2478
2478
  let changes_arr = [];
2479
- debugger;
2479
+
2480
2480
  for (const key of account_profile_properties) {
2481
2481
  let val = req[key];
2482
2482
  if (typeof val === 'undefined') continue;
2483
- if (acc_obj[key] !== val) {
2483
+ if (account_profile_doc[key] !== val) {
2484
2484
  changes_arr.push(key);
2485
- acc_obj[key] = val;
2485
+ account_profile_doc[key] = val;
2486
2486
  }
2487
2487
  }
2488
2488
 
@@ -2491,9 +2491,9 @@ export const update_account_profile = async function (req, job_id, headers) {
2491
2491
  // return { code: 56, data: 'no change' };
2492
2492
  }
2493
2493
 
2494
- acc_obj.ts = Date.now();
2494
+ account_profile_doc.ts = Date.now();
2495
2495
 
2496
- const save_ret = await db_module.save_couch_doc('xuda_accounts', acc_obj);
2496
+ const save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
2497
2497
 
2498
2498
  return { code: 56, data: save_ret };
2499
2499
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1092",
3
+ "version": "1.2.1094",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {