@xuda.io/account_module 1.2.920 → 1.2.922

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 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1411,6 +1411,7 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
1411
1411
  try {
1412
1412
  let contact_doc = await db_module.get_couch_doc_native('xuda_contacts', doc._id);
1413
1413
  contact_doc.team_req_id = '';
1414
+ await db_module.save_couch_doc('xuda_contacts', contact_doc);
1414
1415
  } catch (error) {}
1415
1416
  }
1416
1417
  doc.connection_stat = 0;
@@ -1885,7 +1886,7 @@ export const unpin_contact = async function (req) {
1885
1886
  export const add_contact = async function (req, job_id, headers) {
1886
1887
  try {
1887
1888
  const { uid, email, name, stat, contact_uid, context, source, team_req_id, metadata } = req;
1888
- const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: [uid, email] });
1889
+ const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [uid, email] });
1889
1890
 
1890
1891
  if (contact_ret.rows.length) {
1891
1892
  throw new Error('contact already exist active or deleted');
@@ -1943,7 +1944,7 @@ export const update_contact = async function (req) {
1943
1944
  const { uid, email, contact_uid, stat, team_req_id } = req;
1944
1945
  var contact_ret;
1945
1946
  if (email) {
1946
- contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: [uid, email] });
1947
+ contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [uid, email] });
1947
1948
  } else if (contact_uid) {
1948
1949
  contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [uid, contact_uid] });
1949
1950
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.920",
3
+ "version": "1.2.922",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {