@xuda.io/account_module 1.2.1282 → 1.2.1283

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 +15 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2107,6 +2107,20 @@ export const add_contact = async function (req, job_id, headers) {
2107
2107
  throw new Error('contact already exist active or deleted');
2108
2108
  }
2109
2109
 
2110
+ //////////////////
2111
+ const opt = {
2112
+ selector: {
2113
+ docType: 'contact',
2114
+ stat: 3,
2115
+ email,
2116
+ },
2117
+ limit: 1,
2118
+ fields: ['_id'],
2119
+ };
2120
+ const user_contacts = await find_contact_query(req_obj.team_req_to_uid, opt);
2121
+
2122
+ /////////////////
2123
+
2110
2124
  let is_spam = false;
2111
2125
  let profile_avatar, profile_avatar_obj;
2112
2126
  let account_info_ret;
@@ -2138,7 +2152,7 @@ export const add_contact = async function (req, job_id, headers) {
2138
2152
  const d = Date.now();
2139
2153
  const doc = {
2140
2154
  _id: await _common.xuda_get_uuid('contact'),
2141
- email: [email],
2155
+ email,
2142
2156
  name,
2143
2157
  stat: stat || 1,
2144
2158
  date_created: d,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1282",
3
+ "version": "1.2.1283",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {