@xuda.io/account_module 1.2.2043 → 1.2.2045

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 +7 -14
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -49,6 +49,7 @@ 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
51
  const stripe_ms = await import(`${module_path}/stripe_module/index_ms.mjs`);
52
+ const logs_ms = await import(`${module_path}/logs_module/index_ms.mjs`);
52
53
 
53
54
  export const update_account_info = async function (req, job_id, headers) {
54
55
  const { uid } = req;
@@ -784,9 +785,8 @@ export const add_account_log_util = async function (body, status, service, sourc
784
785
  if (!security) {
785
786
  if (service.substr(0, 4) === 'get_' && !body.api_pk && !body.api_sk) return;
786
787
  }
787
- // }
788
- const logs_module = await import(`${module_path}/logs_module/index.mjs`);
789
- logs_module.add_account_log(get_account_log_object(body, status, service, source, response_data, ip, headers, security));
788
+
789
+ logs_ms.add_account_log(get_account_log_object(body, status, service, source, response_data, ip, headers, security));
790
790
  };
791
791
 
792
792
  export const save_ssh_key = async function (req) {
@@ -2450,8 +2450,7 @@ export const get_contacts = async function (req, job_id, headers) {
2450
2450
  export const archive_contact = async function (req) {
2451
2451
  const { uid, contact_id } = req;
2452
2452
  try {
2453
- const team_module = await import(`${module_path}/team_module/index.mjs`);
2454
- await team_module.validate_share_exist(uid, 'contact', contact_id);
2453
+ await team_ms.validate_share_exist(uid, 'contact', contact_id);
2455
2454
 
2456
2455
  var contact_doc = await get_contact(uid, contact_id);
2457
2456
 
@@ -3109,8 +3108,8 @@ export const archive_account_profile = async function (req) {
3109
3108
  const { uid, profile_id } = req;
3110
3109
  try {
3111
3110
  const app_id = await get_account_default_project_id(uid);
3112
- const team_module = await import(`${module_path}/team_module/index.mjs`);
3113
- await team_module.validate_share_exist(uid, 'account_profile', profile_id);
3111
+
3112
+ await team_ms.validate_share_exist(uid, 'account_profile', profile_id);
3114
3113
 
3115
3114
  var account_profile_doc = await db_module.get_app_couch_doc_native(app_id, profile_id);
3116
3115
 
@@ -3125,9 +3124,6 @@ export const archive_account_profile = async function (req) {
3125
3124
  const account_profile_save_ret = await db_module.save_app_couch_doc(app_id, account_profile_doc);
3126
3125
 
3127
3126
  return account_profile_save_ret;
3128
- // } else {
3129
- // return await team_module.change_account_profile_dependencies_status(account_profile_doc.team_req_id, 5);
3130
- // }
3131
3127
  } catch (err) {
3132
3128
  return {
3133
3129
  code: -22,
@@ -3164,7 +3160,7 @@ export const unarchive_account_profile = async function (req) {
3164
3160
  const { profile_id } = req;
3165
3161
  try {
3166
3162
  const app_id = await get_account_default_project_id(uid);
3167
- // const team_module = await import(`${module_path}/team_module/index.mjs`);
3163
+
3168
3164
  var account_profile_doc = await db_module.get_app_couch_doc_native(app_id, profile_id);
3169
3165
 
3170
3166
  if (account_profile_doc.stat !== 5) {
@@ -3179,9 +3175,6 @@ export const unarchive_account_profile = async function (req) {
3179
3175
 
3180
3176
  return account_profile_save_ret;
3181
3177
  }
3182
- // else {
3183
- // return await team_module.change_account_profile_dependencies_status(account_profile_doc.team_req_id, 3);
3184
- // }
3185
3178
  } catch (err) {
3186
3179
  return {
3187
3180
  code: -22,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2043",
3
+ "version": "1.2.2045",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {