@xuda.io/account_module 1.2.1547 → 1.2.1548

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 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1832,9 +1832,9 @@ export const get_account_ai_usage = async function (req, job_id, headers) {
1832
1832
  const curr_month = Number(String(d.getMonth() + 1).padStart(2, '0')); // months are 0-based
1833
1833
  const curr_year = d.getFullYear();
1834
1834
 
1835
- const ai_usage = await db_module.get_app_couch_view(app_id, 'ai_chat_usage', {
1836
- startkey: [year || curr_year, month || curr_month, day || 0],
1837
- endkey: [year || curr_year, month || curr_month, day || 99],
1835
+ const ai_usage = await db_module.get_couch_view('xuda_usage', 'ai_usage', {
1836
+ startkey: [uid, year || curr_year, month || curr_month, day || 0],
1837
+ endkey: [uid, year || curr_year, month || curr_month, day || 99],
1838
1838
  reduce: true,
1839
1839
  group_level: 999,
1840
1840
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1547",
3
+ "version": "1.2.1548",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {