@xuda.io/account_module 1.2.439 → 1.2.441
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 +0 -30
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1253,8 +1253,6 @@ export const get_contacts = async function (req) {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
1255
|
////// FROM
|
|
1256
|
-
// requests_from = await db_module.find_couch_query('xuda_team', { selector: { docType: 'team_request', access_type: 'contact', team_req_stat: 2, team_req_from_uid: uid }, fields: ['_id', 'team_req_date', 'team_req_to_email', 'team_req_from_uid'] });
|
|
1257
|
-
|
|
1258
1256
|
const requests_from_res = await db_module.find_couch_query('xuda_team', { selector: { docType: 'team_request', access_type: 'contact', team_req_stat: 2, team_req_to_uid: uid }, fields: ['_id', 'team_req_date', 'sender_account_info.email', 'team_req_from_uid'] });
|
|
1259
1257
|
|
|
1260
1258
|
for await (let e of requests_from_res.docs) {
|
|
@@ -1278,34 +1276,6 @@ export const get_contacts = async function (req) {
|
|
|
1278
1276
|
docs: [...requests_to.docs, ...requests_from.docs, ...contacts.docs],
|
|
1279
1277
|
},
|
|
1280
1278
|
};
|
|
1281
|
-
|
|
1282
|
-
// if (with_requests) {
|
|
1283
|
-
// requests_from = await db_module.find_couch_query('xuda_team', { selector: { docType: 'team_request', access_type: 'contact', team_req_stat: 2, team_req_from_uid: uid }, fields: ['_id', 'team_req_date', 'team_req_to_email', 'team_req_from_uid'] });
|
|
1284
|
-
// requests_to = await db_module.find_couch_query('xuda_team', {
|
|
1285
|
-
// selector: { docType: 'team_request', access_type: 'contact', team_req_stat: 2, team_req_to_uid: uid },
|
|
1286
|
-
// fields: ['_id', 'team_req_date', 'team_req_to_uid', 'team_req_to_email', 'sender_account_info.email', 'sender_account_info.first_name', 'sender_account_info.last_name', 'sender_account_info.profile_avatar', 'team_req_from_uid'],
|
|
1287
|
-
// });
|
|
1288
|
-
// }
|
|
1289
|
-
|
|
1290
|
-
// return {
|
|
1291
|
-
// code: 1,
|
|
1292
|
-
// data: {
|
|
1293
|
-
// docs: [
|
|
1294
|
-
// ...requests_from.docs.map((e) => ({ docType: 'contact', date_created: e.team_req_date, email: [e.team_req_to_email], name: '', profile_avatar: _conf.anonymous_image_url, pending: true, uid: e.team_req_from_uid, team_req_id: e._id })),
|
|
1295
|
-
// ...requests_to.docs.map((e) => ({
|
|
1296
|
-
// docType: 'contact',
|
|
1297
|
-
// date_created: e.team_req_date,
|
|
1298
|
-
// email: [e.sender_account_info.email],
|
|
1299
|
-
// name: `${e.sender_account_info.first_name} ${e.sender_account_info.last_name}`,
|
|
1300
|
-
// profile_avatar: e.sender_account_info.profile_avatar || _conf.anonymous_image_url,
|
|
1301
|
-
// pending: true,
|
|
1302
|
-
// team_req_from_uid: e.team_req_from_uid,
|
|
1303
|
-
// team_req_id: e._id,
|
|
1304
|
-
// })),
|
|
1305
|
-
// ...contacts.docs,
|
|
1306
|
-
// ],
|
|
1307
|
-
// },
|
|
1308
|
-
// };
|
|
1309
1279
|
};
|
|
1310
1280
|
|
|
1311
1281
|
export const archive_contact = async function (req) {
|