@xuda.io/account_module 1.2.1543 → 1.2.1545

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 +2 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -3050,7 +3050,7 @@ export const record_ai_usage = async function (uid, input_tokens, output_tokens,
3050
3050
 
3051
3051
  export const record_ai_credit = async function (uid, credits = 0, source, details, credited_uid) {
3052
3052
  try {
3053
- var dup = await db_module.find_app_couch_query(app_id, {
3053
+ var dup = await db_module.find_couch_query('xuda_billing', {
3054
3054
  selector: {
3055
3055
  docType: 'ai_credit',
3056
3056
  credited_uid,
@@ -3061,7 +3061,7 @@ export const record_ai_credit = async function (uid, credits = 0, source, detail
3061
3061
  });
3062
3062
 
3063
3063
  if (dup.docs.length) {
3064
- throw new Error(`${details} already credited!`);
3064
+ throw new Error(`${details} - already credited!`);
3065
3065
  }
3066
3066
 
3067
3067
  const t = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1543",
3
+ "version": "1.2.1545",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {