mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 21:29:11 +00:00
dump updated config to a yaml file
This commit is contained in:
@@ -37,8 +37,9 @@ def config():
|
||||
|
||||
@app.post('/config')
|
||||
async def config(updated_config: FullConfig):
|
||||
to_yaml = yaml.dump(updated_config.json())
|
||||
print(to_yaml)
|
||||
with open('config.yml', 'w') as outfile:
|
||||
yaml.dump(yaml.safe_load(updated_config.json()), outfile)
|
||||
outfile.close()
|
||||
return updated_config
|
||||
|
||||
@app.get('/search')
|
||||
|
||||
Reference in New Issue
Block a user