@xuda.io/account_module 1.2.2162 → 1.2.2163
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 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3392,12 +3392,14 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
|
|
|
3392
3392
|
const timestamp_from = new Date(Number(year_from) || year, (Number(month_from) || month) - 1, Number(day_from) || day).getTime();
|
|
3393
3393
|
const timestamp_to = new Date(Number(year_to) || year, (Number(month_to) || month) - 1, Number(day_to) || day).getTime();
|
|
3394
3394
|
|
|
3395
|
-
const
|
|
3395
|
+
const filter = {
|
|
3396
3396
|
startkey: [uid, timestamp_from],
|
|
3397
3397
|
endkey: [uid, timestamp_to],
|
|
3398
3398
|
reduce: true,
|
|
3399
3399
|
group_level: 999,
|
|
3400
|
-
}
|
|
3400
|
+
};
|
|
3401
|
+
|
|
3402
|
+
const ai_usage = await db_module.get_couch_view('xuda_usage', 'ai_usage', {});
|
|
3401
3403
|
// console.log('ai_usage', ai_usage.rows);
|
|
3402
3404
|
debugger;
|
|
3403
3405
|
let total_usage = 0;
|