@xuda.io/account_module 1.2.1560 → 1.2.1562
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 +4 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1801,6 +1801,9 @@ export const onboarding_completed = async function (req, job_id, headers) {
|
|
|
1801
1801
|
// account_doc.account_info.active_account_profile_id = account_doc.account_profile_id;
|
|
1802
1802
|
// }
|
|
1803
1803
|
// }
|
|
1804
|
+
|
|
1805
|
+
record_ai_credit(uid, 1, 'onboarding', 'free daily credit ' + new Date(), uid);
|
|
1806
|
+
|
|
1804
1807
|
account_doc.boarded_info = { headers, date_ts: Date.now() };
|
|
1805
1808
|
account_doc.isBoarded = true;
|
|
1806
1809
|
const save_ret = await db_module.save_couch_doc('xuda_accounts', account_doc);
|
|
@@ -1826,7 +1829,7 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
1826
1829
|
const { uid, year, month, day, usage_scope = 'account' } = req;
|
|
1827
1830
|
try {
|
|
1828
1831
|
// const app_id = await get_account_default_project_id(uid);
|
|
1829
|
-
const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
|
|
1832
|
+
// const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
|
|
1830
1833
|
|
|
1831
1834
|
const d = new Date();
|
|
1832
1835
|
const curr_month = Number(String(d.getMonth() + 1).padStart(2, '0')); // months are 0-based
|