feat(config): update file path, add post endpoint
This commit is contained in:
parent
97f6196d9b
commit
4cb20542a5
3 changed files with 82 additions and 28 deletions
|
|
@ -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),
|
||||
);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue