Files
Homarr/src/tools/config/getConfig.ts

10 lines
365 B
TypeScript
Raw Normal View History

import { BackendConfigType, ConfigType } from '../../types/config';
2022-12-11 14:11:25 +01:00
import { configExists } from './configExists';
import { getFallbackConfig } from './getFallbackConfig';
import { readConfig } from './readConfig';
export const getConfig = (name: string): BackendConfigType => {
2022-12-11 14:11:25 +01:00
if (!configExists(name)) return getFallbackConfig();
return readConfig(name);
};