@xuda.io/account_module 1.2.1328 → 1.2.1330

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 +3 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -580,13 +580,11 @@ export const get_account_info = async function (req) {
580
580
  });
581
581
  };
582
582
 
583
- export const get_active_account_profile_info = async function (uid) {
583
+ export const get_active_account_profile_info = async function (uid, profile_id) {
584
584
  const acc_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
585
585
 
586
- let active_account_profile_id = acc_obj.account_info.active_account_profile_id;
586
+ let active_account_profile_id = profile_id || acc_obj.account_info.active_account_profile_id;
587
587
 
588
- try {
589
- } catch (error) {}
590
588
  const account_profile_obj = await db_module.get_app_couch_doc_native(acc_obj.account_project_id, active_account_profile_id);
591
589
  if (account_profile_obj.share_item_id) {
592
590
  // set the original profile id if shared
@@ -2021,7 +2019,7 @@ export const add_contact = async function (req, job_id, headers) {
2021
2019
  is_spam,
2022
2020
  profile_avatar,
2023
2021
  profile_avatar_obj,
2024
- account_profiles: [account_profile_obj],
2022
+ account_profiles: [account_profile_obj._id],
2025
2023
  };
2026
2024
  const ret = await save_contact(uid, doc);
2027
2025
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1328",
3
+ "version": "1.2.1330",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {