@xuda.io/account_module 1.2.2218 → 1.2.2220

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 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3118,10 +3118,9 @@ export const get_account_profiles = async function (req) {
3118
3118
  export const archive_account_profile = async function (req) {
3119
3119
  const { uid, profile_id } = req;
3120
3120
  try {
3121
- debugger;
3122
3121
  const app_id = await get_account_default_project_id(uid);
3123
3122
 
3124
- await team_ms.validate_share_exist(uid, 'account_profile', profile_id);
3123
+ // await team_ms.validate_share_exist(uid, 'account_profile', profile_id);
3125
3124
 
3126
3125
  var account_profile_doc = await db_module.get_app_couch_doc_native(app_id, profile_id);
3127
3126
 
@@ -3148,6 +3147,9 @@ export const delete_account_profile = async function (req, job_id, headers) {
3148
3147
  const { profile_id, uid } = req;
3149
3148
  try {
3150
3149
  const app_id = await get_account_default_project_id(uid);
3150
+
3151
+ await team_ms.validate_share_exist(uid, 'account_profile', profile_id);
3152
+
3151
3153
  var account_profile_doc = await db_module.get_app_couch_doc_native(app_id, profile_id);
3152
3154
  if (account_profile_doc.stat !== 5) {
3153
3155
  throw new Error('A document can only be deleted after it has been archived');
@@ -3654,7 +3656,9 @@ export const record_ai_credit = async function (uid, credits = 0, source, detail
3654
3656
  // console.log(save_ret);
3655
3657
  return save_ret;
3656
3658
  } catch (err) {
3657
- console.error(err);
3659
+ if (!err.message?.includes('already credited!')) {
3660
+ console.error(err);
3661
+ }
3658
3662
  return { code: -78, data: err.message };
3659
3663
  }
3660
3664
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2218",
3
+ "version": "1.2.2220",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {