@xuda.io/account_module 1.2.1337 → 1.2.1338

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 -27
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2776,10 +2776,10 @@ export const update_account_profile = async function (req, job_id, headers) {
2776
2776
  };
2777
2777
 
2778
2778
  export const update_entity_account_profiles = async function (req, job_id, headers) {
2779
- const { uid, entity, _id, account_profiles } = req;
2779
+ const { uid, _id, account_profiles } = req;
2780
2780
  const app_id = await account_module.get_account_default_project_id(uid);
2781
2781
 
2782
- let save_ret;
2782
+ // let save_ret;
2783
2783
  try {
2784
2784
  let doc = await db_module.get_app_couch_doc_native(app_id, _id);
2785
2785
 
@@ -2801,31 +2801,7 @@ export const update_entity_account_profiles = async function (req, job_id, heade
2801
2801
  break;
2802
2802
  }
2803
2803
 
2804
- // let { data: account_profile_doc } = await db_module.get_app_couch_doc(app_id, _id);
2805
-
2806
- // if (account_profile_doc.docType !== 'account_profile') {
2807
- // throw new Error('not account profile doc');
2808
- // }
2809
-
2810
- // let changes_arr = [];
2811
-
2812
- // for (const key of account_profile_properties) {
2813
- // let val = req[key];
2814
- // if (typeof val === 'undefined') continue;
2815
- // if (account_profile_doc[key] !== val) {
2816
- // changes_arr.push(key);
2817
- // account_profile_doc[key] = val;
2818
- // }
2819
- // }
2820
-
2821
- // if (!changes_arr.length) {
2822
- // // throw new Error('no change');
2823
- // return { code: 56, data: 'no change' };
2824
- // }
2825
-
2826
- // account_profile_doc.ts = Date.now();
2827
-
2828
- const save_ret = await db_module.save_app_couch_doc(app_id, account_profile_doc);
2804
+ const save_ret = await db_module.save_app_couch_doc(app_id, doc);
2829
2805
 
2830
2806
  return { code: 57, data: save_ret };
2831
2807
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1337",
3
+ "version": "1.2.1338",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {