@xuda.io/account_module 1.2.2160 → 1.2.2162

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.
Files changed (2) hide show
  1. package/index.mjs +3 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3390,10 +3390,11 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
3390
3390
  const app_id = await get_account_default_project_id(uid);
3391
3391
 
3392
3392
  const timestamp_from = new Date(Number(year_from) || year, (Number(month_from) || month) - 1, Number(day_from) || day).getTime();
3393
+ const timestamp_to = new Date(Number(year_to) || year, (Number(month_to) || month) - 1, Number(day_to) || day).getTime();
3393
3394
 
3394
3395
  const ai_usage = await db_module.get_couch_view('xuda_usage', 'ai_usage', {
3395
- startkey: [uid, year_from || curr_year, month_from || curr_month, day_from || 0],
3396
- endkey: [uid, year_to || curr_year, month_to || curr_month, day_to || 99],
3396
+ startkey: [uid, timestamp_from],
3397
+ endkey: [uid, timestamp_to],
3397
3398
  reduce: true,
3398
3399
  group_level: 999,
3399
3400
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2160",
3
+ "version": "1.2.2162",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {