@xuda.io/account_module 1.2.1299 → 1.2.1301
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 +6 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2856,8 +2856,9 @@ export const delete_account_profile = async function (req, job_id, headers) {
|
|
|
2856
2856
|
export const unarchive_account_profile = async function (req) {
|
|
2857
2857
|
const { profile_id } = req;
|
|
2858
2858
|
try {
|
|
2859
|
+
const app_id = await get_account_default_project_id(uid);
|
|
2859
2860
|
const team_module = await import(`${module_path}/team_module/index.mjs`);
|
|
2860
|
-
var account_profile_doc = await db_module.
|
|
2861
|
+
var account_profile_doc = await db_module.get_app_couch_doc_native(app_id, profile_id);
|
|
2861
2862
|
|
|
2862
2863
|
if (account_profile_doc.stat !== 5) {
|
|
2863
2864
|
throw new Error('account profile is not archived');
|
|
@@ -2867,12 +2868,13 @@ export const unarchive_account_profile = async function (req) {
|
|
|
2867
2868
|
account_profile_doc.stat_ts = Date.now();
|
|
2868
2869
|
account_profile_doc.stat_reason = 'archived by the user';
|
|
2869
2870
|
|
|
2870
|
-
const account_profile_save_ret = await db_module.
|
|
2871
|
+
const account_profile_save_ret = await db_module.save_app_couch_doc(app_id, account_profile_doc);
|
|
2871
2872
|
|
|
2872
2873
|
return account_profile_save_ret;
|
|
2873
|
-
} else {
|
|
2874
|
-
return await team_module.change_account_profile_dependencies_status(account_profile_doc.team_req_id, 3);
|
|
2875
2874
|
}
|
|
2875
|
+
// else {
|
|
2876
|
+
// return await team_module.change_account_profile_dependencies_status(account_profile_doc.team_req_id, 3);
|
|
2877
|
+
// }
|
|
2876
2878
|
} catch (err) {
|
|
2877
2879
|
return {
|
|
2878
2880
|
code: -22,
|