@xuda.io/account_module 1.2.2040 → 1.2.2042

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 -25
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -48,6 +48,7 @@ const jobs_ms = await import(`${module_path}/jobs_module/index_ms.mjs`);
48
48
  const team_ms = await import(`${module_path}/team_module/index_ms.mjs`);
49
49
  const email_ms = await import(`${module_path}/email_module/index_ms.mjs`);
50
50
  const marketplace_ms = await import(`${module_path}/marketplace_module/index_ms.mjs`);
51
+ const stripe_ms = await import(`${module_path}/stripe_module/index_ms.mjs`);
51
52
 
52
53
  export const update_account_info = async function (req, job_id, headers) {
53
54
  const { uid } = req;
@@ -194,23 +195,12 @@ export const update_account_info = async function (req, job_id, headers) {
194
195
 
195
196
  const save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
196
197
 
197
- // const ai_module = await import(`${module_path}/ai_module/index.mjs`);
198
-
199
198
  if (account_obj.account_info?.profile_picture) {
200
199
  if (!account_obj.account_info?.profile_avatar && account_obj.account_info.profile_avatar_stat !== 2) {
201
200
  debugger;
202
201
  set_account_profile_picture(uid, uid, account_obj.account_info, job_id, headers, account_profile_info);
203
202
  }
204
203
  }
205
- // if (account_obj.account_info?.profile_picture) {
206
- // if (!account_obj.account_info?.profile_avatar) {
207
- // ai_module.get_profile_avatar({ url: account_obj.account_info?.profile_picture, uid, account_obj, account_profile_info }, job_id, headers);
208
- // }
209
- // } else {
210
- // ai_module.update_thumbnail('account', account_obj, account_obj.account_project_id, uid, job_id, headers, 'xuda_accounts');
211
- // }
212
-
213
- // update_contacts_with_account_changes(account_obj._id, account_info_changes_arr);
214
204
 
215
205
  if (save_ret.code > 0) {
216
206
  return { code: 1300, data: 'ok' };
@@ -1413,17 +1403,6 @@ export const get_contact_info = async function (uid, contact_doc, _id) {
1413
1403
  doc.notifications = contact_chat_conversation_count_ret - contact_chat_conversation_read_ret;
1414
1404
  doc.chats = doc.interactions;
1415
1405
 
1416
- // const chats_ret = await ai_module.get_ai_chats({ uid, reference_id: doc._id });
1417
- // for (let chat_doc of chats_ret.data.docs) {
1418
- // doc.notifications += chat_doc.notifications;
1419
-
1420
- // doc.chats++;
1421
- // if (chat_doc.interactions) {
1422
- // doc.interactions += chat_doc.interactions;
1423
- // }
1424
- // doc.contact_mood_level = chat_doc.mood_level || 0;
1425
- // }
1426
- // console.log('contact_mood_level', doc._id, doc.contact_mood_level);
1427
1406
  doc.card_background = get_contact_background(doc);
1428
1407
 
1429
1408
  doc.border = get_contact_border(doc);
@@ -1595,9 +1574,7 @@ export const get_account_rt_info = async function (uid) {
1595
1574
  };
1596
1575
 
1597
1576
  export const validate_account_topup = async function (uid, items = []) {
1598
- const stripe_module = await import(`${module_path}/stripe_module/index.mjs`);
1599
-
1600
- const { code, data } = await stripe_module.get_billing_metrics({ uid });
1577
+ const { code, data } = await stripe_ms.get_billing_metrics({ uid });
1601
1578
  if (code < 0) {
1602
1579
  throw new Error(data);
1603
1580
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2040",
3
+ "version": "1.2.2042",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {