@xuda.io/account_module 1.2.1562 → 1.2.1564

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 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1802,8 +1802,6 @@ export const onboarding_completed = async function (req, job_id, headers) {
1802
1802
  // }
1803
1803
  // }
1804
1804
 
1805
- record_ai_credit(uid, 1, 'onboarding', 'free daily credit ' + new Date(), uid);
1806
-
1807
1805
  account_doc.boarded_info = { headers, date_ts: Date.now() };
1808
1806
  account_doc.isBoarded = true;
1809
1807
  const save_ret = await db_module.save_couch_doc('xuda_accounts', account_doc);
@@ -3106,7 +3104,9 @@ export const record_ai_credit = async function (uid, credits = 0, source, detail
3106
3104
  };
3107
3105
  const save_ret = await db_module.save_couch_doc('xuda_billing', credit_doc);
3108
3106
  // console.log(save_ret);
3107
+ return save_ret;
3109
3108
  } catch (err) {
3110
3109
  console.error(err);
3110
+ return { code: -78, data: err.message };
3111
3111
  }
3112
3112
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1562",
3
+ "version": "1.2.1564",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {