@xuda.io/account_module 1.2.1216 → 1.2.1218
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 +3 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2464,6 +2464,7 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
2464
2464
|
});
|
|
2465
2465
|
// console.log('ai_usage', ai_usage.rows);
|
|
2466
2466
|
|
|
2467
|
+
total_usage = 0;
|
|
2467
2468
|
let profile = {};
|
|
2468
2469
|
|
|
2469
2470
|
debugger;
|
|
@@ -2491,8 +2492,9 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
2491
2492
|
let membership_plan = _conf.PLAN_OBJ?.[acc_obj?.ai_workspace_plan]?.features?.ai_credits || 0;
|
|
2492
2493
|
let ai_workspace_plan = _conf.PLAN_OBJ?.[acc_obj?.membership_plan]?.features?.ai_credits || 0;
|
|
2493
2494
|
let contact_connection = 0;
|
|
2495
|
+
let total_credits = membership_plan + ai_workspace_plan + contact_connection;
|
|
2494
2496
|
|
|
2495
|
-
let data = { credits: { membership_plan, ai_workspace_plan, contact_connection }, usage: { profile, projects: [] } };
|
|
2497
|
+
let data = { credits: { membership_plan, ai_workspace_plan, contact_connection, total: total_credits }, usage: { profile, projects: [], total: total_usage } };
|
|
2496
2498
|
|
|
2497
2499
|
return { code: 55, data };
|
|
2498
2500
|
} catch (err) {
|