mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-08-11 18:28:48 +00:00
feat(config): update file path, add post endpoint
This commit is contained in:
@ -109,9 +109,9 @@ const mergeConfigs = (current: any, update: any): any => {
|
||||
export const updateConfig = (config: RecursivePartial<Config>) => {
|
||||
const currentConfig = loadConfig();
|
||||
const mergedConfig = mergeConfigs(currentConfig, config);
|
||||
|
||||
console.log(mergedConfig);
|
||||
fs.writeFileSync(
|
||||
path.join(__dirname, `../${configFileName}`),
|
||||
path.join(path.join(process.cwd(), `${configFileName}`)),
|
||||
toml.stringify(mergedConfig),
|
||||
);
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user