@xuda.io/account_module 1.2.364 → 1.2.366
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.
- package/index.mjs +5 -7
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1254,7 +1254,7 @@ export const delete_contact = async function (req) {
|
|
|
1254
1254
|
export const add_contact = async function (req, job_id, headers) {
|
|
1255
1255
|
try {
|
|
1256
1256
|
debugger;
|
|
1257
|
-
const { uid, email, name, stat, contact_uid,
|
|
1257
|
+
const { uid, email, name, stat, contact_uid, context, source, team_req_id } = req;
|
|
1258
1258
|
const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: [uid, email] });
|
|
1259
1259
|
|
|
1260
1260
|
if (contact_ret.rows.length) {
|
|
@@ -1282,9 +1282,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1282
1282
|
docType: 'contact',
|
|
1283
1283
|
contact_uid,
|
|
1284
1284
|
uid,
|
|
1285
|
-
|
|
1286
|
-
profile_picture,
|
|
1287
|
-
profile_avatar,
|
|
1285
|
+
|
|
1288
1286
|
context,
|
|
1289
1287
|
headers,
|
|
1290
1288
|
source,
|
|
@@ -1303,7 +1301,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1303
1301
|
}
|
|
1304
1302
|
};
|
|
1305
1303
|
export const update_contact = async function (req) {
|
|
1306
|
-
const { uid, email, contact_uid, stat,
|
|
1304
|
+
const { uid, email, contact_uid, stat, team_req_id } = req;
|
|
1307
1305
|
var contact_ret;
|
|
1308
1306
|
if (email) {
|
|
1309
1307
|
contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: [uid, email] });
|
|
@@ -1316,8 +1314,8 @@ export const update_contact = async function (req) {
|
|
|
1316
1314
|
doc.stat = stat;
|
|
1317
1315
|
doc.stat_ts = Date.now();
|
|
1318
1316
|
}
|
|
1319
|
-
if (
|
|
1320
|
-
doc.
|
|
1317
|
+
if (team_req_id) {
|
|
1318
|
+
doc.team_req_id = team_req_id;
|
|
1321
1319
|
}
|
|
1322
1320
|
|
|
1323
1321
|
if (contact_uid) {
|