@xuda.io/account_module 1.2.1188 → 1.2.1189

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 +26 -17
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2875,29 +2875,38 @@ export const unarchive_account_profile = async function (req) {
2875
2875
  // export const unfriend_account_profile = async function (req) {
2876
2876
  // const { profile_id } = req;
2877
2877
  // try {
2878
- // const contact_ret = await db_module.get_couch_doc('xuda_accounts', profile_id);
2879
- // if (contact_ret.code < 0) {
2880
- // throw new Error(contact_ret.data);
2881
- // }
2882
- // var account_profile_doc = contact_ret.data;
2878
+ //
2879
+ // } catch (err) {
2880
+ // return {
2881
+ // code: -21,
2882
+ // data: err.message,
2883
+ // };
2884
+ // }
2885
+ // };
2883
2886
 
2884
- // if (!account_profile_doc.team_req_id) {
2885
- // throw new Error('no friend relationship found');
2886
- // }
2887
- // let req_doc = await db_module.get_couch_doc_native('xuda_team', account_profile_doc.team_req_id);
2888
- // req_doc.team_req_stat = 4;
2889
- // req_doc.team_req_stat_desc = 'unfriend by the user';
2890
- // await db_module.get_couch_doc_native('xuda_team', account_profile_doc.team_req_id);
2887
+ // export const validate_account_asset_change = async function (req) {
2888
+ // const { profile_id } = req;
2889
+ // try {
2890
+ // const team_module = await import(`${module_path}/team_module/index.mjs`);
2891
+ // var account_profile_doc = await db_module.get_couch_doc_native('xuda_accounts', profile_id);
2891
2892
 
2892
- // account_profile_doc.team_req_id = null;
2893
- // const account_profile_save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
2893
+ // if (account_profile_doc.stat !== 5) {
2894
+ // throw new Error('account profile is not archived');
2895
+ // }
2896
+ // if (!account_profile_doc.team_req_id) {
2897
+ // account_profile_doc.stat = 3;
2898
+ // account_profile_doc.stat_ts = Date.now();
2899
+ // account_profile_doc.stat_reason = 'archived by the user';
2894
2900
 
2895
- // const req_save_ret = await db_module.save_couch_doc('xuda_team', req_doc);
2901
+ // const account_profile_save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
2896
2902
 
2897
- // return req_save_ret;
2903
+ // return account_profile_save_ret;
2904
+ // } else {
2905
+ // return await team_module.change_account_profile_dependencies_status(account_profile_doc.team_req_id, 3);
2906
+ // }
2898
2907
  // } catch (err) {
2899
2908
  // return {
2900
- // code: -21,
2909
+ // code: -22,
2901
2910
  // data: err.message,
2902
2911
  // };
2903
2912
  // }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1188",
3
+ "version": "1.2.1189",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {