mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-01 20:01:35 +00:00
💰 fix: Load app config in set-balance script to respect balance settings (#12669)
The `set-balance` script called `getBalanceConfig()` without the app config, so it always reported balance as disabled regardless of the librechat.yaml configuration. Mirror the working `add-balance` script by loading the app config first and passing it into `getBalanceConfig`. Fixes #12413 Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
444d923e29
commit
3487672a32
1 changed files with 1 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ const mongoose = require('mongoose');
|
|||
const { getBalanceConfig } = require('@librechat/api');
|
||||
const { User, Balance } = require('@librechat/data-schemas').createModels(mongoose);
|
||||
require('module-alias')({ base: path.resolve(__dirname, '..', 'api') });
|
||||
const { getAppConfig } = require('~/server/services/Config');
|
||||
const { askQuestion, silentExit } = require('./helpers');
|
||||
const connect = require('./connect');
|
||||
const { getAppConfig } = require('~/server/services/Config');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue