@xuda.io/account_module 1.2.1594 → 1.2.1596
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 +2 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -603,7 +603,7 @@ export const get_active_account_profile_info = async function (uid, profile_id)
|
|
|
603
603
|
|
|
604
604
|
return { uid: account_profile_obj.shared_from_uid || uid, account_profile_id: active_account_profile_id, app_id, is_main: active_account_profile_id === acc_obj.account_profile_id, account_profile_obj };
|
|
605
605
|
} catch (err) {
|
|
606
|
-
console.error(err);
|
|
606
|
+
console.error('**** get_active_account_profile_info', err);
|
|
607
607
|
debugger;
|
|
608
608
|
}
|
|
609
609
|
};
|
|
@@ -3127,7 +3127,7 @@ export const add_ai_credits_to_active_accounts = async function () {
|
|
|
3127
3127
|
});
|
|
3128
3128
|
|
|
3129
3129
|
const _24_hr_ms = 1000 * 60 * 60 * 24;
|
|
3130
|
-
const active_accounts = await db_module.find_couch_query('xuda_accounts', { selector: { stat: 3, docType: 'account', last_free_daily_ai_credit_ts: { $lt: Date.now() - _24_hr_ms },
|
|
3130
|
+
const active_accounts = await db_module.find_couch_query('xuda_accounts', { selector: { stat: 3, docType: 'account', last_free_daily_ai_credit_ts: { $lt: Date.now() - _24_hr_ms }, ai_workspace_plan: 'free_ai_workspace' }, limit: 99999 });
|
|
3131
3131
|
for await (let account_doc of active_accounts.docs) {
|
|
3132
3132
|
const ret = await record_ai_credit('system', 1, 'daily credit', 'free daily credit ' + date_str, account_doc._id);
|
|
3133
3133
|
if (ret.code > -1) {
|