@xuda.io/account_module 1.2.1197 → 1.2.1198

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 +2 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1924,9 +1924,10 @@ export const unpin_contact = async function (req) {
1924
1924
  export const add_contact = async function (req, job_id, headers) {
1925
1925
  try {
1926
1926
  const { uid, email, name, stat, contact_uid, context, source, team_req_id, metadata = {} } = req;
1927
- const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [uid, email] });
1928
1927
  const account_profile_info = await get_active_account_profile_info(uid);
1929
1928
 
1929
+ const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [account_profile_info.uid, email] });
1930
+
1930
1931
  if (contact_ret.rows.length) {
1931
1932
  throw new Error('contact already exist active or deleted');
1932
1933
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1197",
3
+ "version": "1.2.1198",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {