@xuda.io/account_module 1.2.2191 → 1.2.2193
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 +3 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -561,6 +561,8 @@ export const get_active_account_profile_info = async function (uid, profile_id)
|
|
|
561
561
|
try {
|
|
562
562
|
const acc_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
|
|
563
563
|
|
|
564
|
+
if (!acc_obj.account_project_id) throw new Error(`acc ${acc_obj._id} has no account_project_id`);
|
|
565
|
+
|
|
564
566
|
let active_account_profile_id = profile_id || acc_obj.account_info.active_account_profile_id;
|
|
565
567
|
|
|
566
568
|
const account_profile_obj = await db_module.get_app_couch_doc_native(acc_obj.account_project_id, active_account_profile_id);
|
|
@@ -573,6 +575,7 @@ export const get_active_account_profile_info = async function (uid, profile_id)
|
|
|
573
575
|
return { uid: account_profile_obj.shared_from_uid || uid, account_profile_id: active_account_profile_id, app_id, is_main: active_account_profile_id === acc_obj.account_profile_id, account_profile_obj };
|
|
574
576
|
} catch (err) {
|
|
575
577
|
console.error('**** get_active_account_profile_info', err);
|
|
578
|
+
console.error(err.message);
|
|
576
579
|
debugger;
|
|
577
580
|
}
|
|
578
581
|
};
|