mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 11:20:15 +01:00
refactor: Rename initializeAppConfig to setAppConfig and update related tests
This commit is contained in:
parent
eeab69ff7f
commit
2501d11fa0
4 changed files with 85 additions and 108 deletions
|
|
@ -70,17 +70,6 @@ async function getAppConfig(options = {}) {
|
|||
return baseConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache the app configuration
|
||||
* @param {AppConfig} config - The configuration to cache
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async function cacheAppConfig(config) {
|
||||
const cache = getLogStores(CacheKeys.CONFIG_STORE);
|
||||
await cache.set(CacheKeys.APP_CONFIG, config);
|
||||
logger.debug('[getAppConfig] App configuration cached');
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the app configuration cache
|
||||
* @returns {Promise<boolean>}
|
||||
|
|
@ -96,7 +85,7 @@ async function clearAppConfigCache() {
|
|||
* @param {AppConfig} config - The initial configuration to store
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async function initializeAppConfig(config) {
|
||||
async function setAppConfig(config) {
|
||||
const cache = getLogStores(CacheKeys.CONFIG_STORE);
|
||||
await cache.set(CacheKeys.APP_CONFIG, config);
|
||||
logger.debug('[getAppConfig] App configuration initialized');
|
||||
|
|
@ -104,7 +93,6 @@ async function initializeAppConfig(config) {
|
|||
|
||||
module.exports = {
|
||||
getAppConfig,
|
||||
cacheAppConfig,
|
||||
setAppConfig,
|
||||
clearAppConfigCache,
|
||||
initializeAppConfig,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue