@xuda.io/account_module 1.2.1294 → 1.2.1296

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 +4 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1934,7 +1934,7 @@ export const get_user_card = async function (uid, uid_query) {
1934
1934
 
1935
1935
  let user_contact_obj;
1936
1936
 
1937
- const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [uid, uid_query] });
1937
+ // const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [uid, uid_query] });
1938
1938
 
1939
1939
  const opt = {
1940
1940
  selector: {
@@ -1947,7 +1947,7 @@ export const get_user_card = async function (uid, uid_query) {
1947
1947
  };
1948
1948
  const user_contacts = await find_contact_query(uid, opt);
1949
1949
 
1950
- const contact_id = contact_ret?.docs?.[0]?._id;
1950
+ const contact_id = user_contacts?.docs?.[0]?._id;
1951
1951
  if (contact_id) {
1952
1952
  user_contact_obj = await get_contact_info(uid, null, contact_id);
1953
1953
  } else {
@@ -2884,7 +2884,7 @@ export const unarchive_account_profile = async function (req) {
2884
2884
  export const create_account_profile = async function (req, job_id, headers) {
2885
2885
  const { uid, profile_name, profile_signature, profile_email, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj, main } = req;
2886
2886
  try {
2887
- // const app_id = await get_account_default_project_id(uid);
2887
+ const app_id = await get_account_default_project_id(uid);
2888
2888
  const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
2889
2889
 
2890
2890
  const d = Date.now();
@@ -2905,7 +2905,7 @@ export const create_account_profile = async function (req, job_id, headers) {
2905
2905
  profile_avatar_obj,
2906
2906
  main,
2907
2907
  };
2908
- const save_ret = await db_module.save_couch_doc('xuda_accounts', doc);
2908
+ const save_ret = await db_module.save_app_couch_doc(app_id, doc);
2909
2909
  // acc_obj.active_profile_id = save_ret.data.id;
2910
2910
 
2911
2911
  // return { code: 55, data: save_ret };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1294",
3
+ "version": "1.2.1296",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {