@xuda.io/account_module 1.2.2063 → 1.2.2065
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 +1 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1779,9 +1779,6 @@ export const ts_contact = async function (uid, contact_id) {
|
|
|
1779
1779
|
export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
1780
1780
|
const { uid, year, month, day, usage_scope = 'account' } = req;
|
|
1781
1781
|
try {
|
|
1782
|
-
// const app_id = await get_account_default_project_id(uid);
|
|
1783
|
-
// const { data: acc_obj } = await db_ms.get_couch_doc('xuda_accounts', uid);
|
|
1784
|
-
debugger;
|
|
1785
1782
|
const d = new Date();
|
|
1786
1783
|
const curr_month = Number(String(d.getMonth() + 1).padStart(2, '0')); // months are 0-based
|
|
1787
1784
|
const curr_year = d.getFullYear();
|
|
@@ -2951,7 +2948,7 @@ export const get_account_profile_info = async function (uid, contact_profile_doc
|
|
|
2951
2948
|
|
|
2952
2949
|
doc.members = await get_members();
|
|
2953
2950
|
const user_account_profiles = await get_user_account_profiles();
|
|
2954
|
-
|
|
2951
|
+
debugger;
|
|
2955
2952
|
const usage_ret = await get_account_ai_usage({ uid });
|
|
2956
2953
|
doc.max_credits = usage_ret.data.credits.total / user_account_profiles.length;
|
|
2957
2954
|
doc.used_credits = usage_ret.data.usage[doc._id] || 0;
|