@xuda.io/account_module 1.2.438 → 1.2.440
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 +2 -31
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import _ from 'lodash';
|
|
3
3
|
// import { removeBackground } from '@imgly/background-removal-node';
|
|
4
|
-
import fs from 'node:fs';
|
|
4
|
+
// import fs from 'node:fs';
|
|
5
5
|
|
|
6
|
-
import os from 'os';
|
|
6
|
+
// import os from 'os';
|
|
7
7
|
import { exec } from 'child_process';
|
|
8
8
|
import util from 'util';
|
|
9
9
|
|
|
@@ -1253,7 +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
1256
|
|
|
1258
1257
|
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
1258
|
|
|
@@ -1278,34 +1277,6 @@ export const get_contacts = async function (req) {
|
|
|
1278
1277
|
docs: [...requests_to.docs, ...requests_from.docs, ...contacts.docs],
|
|
1279
1278
|
},
|
|
1280
1279
|
};
|
|
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
1280
|
};
|
|
1310
1281
|
|
|
1311
1282
|
export const archive_contact = async function (req) {
|