@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.
- package/index.mjs +26 -17
- 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
|
-
//
|
|
2879
|
-
//
|
|
2880
|
-
//
|
|
2881
|
-
//
|
|
2882
|
-
//
|
|
2878
|
+
//
|
|
2879
|
+
// } catch (err) {
|
|
2880
|
+
// return {
|
|
2881
|
+
// code: -21,
|
|
2882
|
+
// data: err.message,
|
|
2883
|
+
// };
|
|
2884
|
+
// }
|
|
2885
|
+
// };
|
|
2883
2886
|
|
|
2884
|
-
//
|
|
2885
|
-
//
|
|
2886
|
-
//
|
|
2887
|
-
//
|
|
2888
|
-
//
|
|
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.
|
|
2893
|
-
//
|
|
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
|
-
//
|
|
2901
|
+
// const account_profile_save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
|
|
2896
2902
|
|
|
2897
|
-
//
|
|
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: -
|
|
2909
|
+
// code: -22,
|
|
2901
2910
|
// data: err.message,
|
|
2902
2911
|
// };
|
|
2903
2912
|
// }
|