@xuda.io/account_module 1.2.1131 → 1.2.1133
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 +9 -6
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2733,14 +2733,17 @@ export const archive_account_profile = async function (req) {
|
|
|
2733
2733
|
if (account_profile_doc.reserve) {
|
|
2734
2734
|
throw new Error('reserve');
|
|
2735
2735
|
}
|
|
2736
|
+
if (!account_profile_doc.team_req_id) {
|
|
2737
|
+
account_profile_doc.stat = 5;
|
|
2738
|
+
account_profile_doc.stat_ts = Date.now();
|
|
2739
|
+
account_profile_doc.stat_reason = 'archived by the user';
|
|
2736
2740
|
|
|
2737
|
-
|
|
2738
|
-
account_profile_doc.stat_ts = Date.now();
|
|
2739
|
-
account_profile_doc.stat_reason = 'archived by the user';
|
|
2740
|
-
|
|
2741
|
-
const account_profile_save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
|
|
2741
|
+
const account_profile_save_ret = await db_module.save_couch_doc('xuda_accounts', account_profile_doc);
|
|
2742
2742
|
|
|
2743
|
-
|
|
2743
|
+
return account_profile_save_ret;
|
|
2744
|
+
} else {
|
|
2745
|
+
return await team_module.change_account_profile_dependencies_status(team_req_id, 5);
|
|
2746
|
+
}
|
|
2744
2747
|
} catch (err) {
|
|
2745
2748
|
return {
|
|
2746
2749
|
code: -22,
|