Skip to content
Snippets Groups Projects
Commit fde2cd65 authored by Duc Bui Tien's avatar Duc Bui Tien
Browse files

add reset to default

parent d6f691bb
No related branches found
No related tags found
2 merge requests!2UnicadoGuiBackend,!1New UnicadoGUI Branch
......@@ -128,6 +128,14 @@ async def update_module_config(config: Conf):
fd.write(xml)
return
@app.get("/modules/{module}/config/reset")
async def reset_module_config(module:str):
with open("xml_configs/"+module+"_conf_default.xml", encoding='utf8') as fd:
config = json.dumps(xmltodict.parse(fd.read()))
with open("xml_configs/"+module+"_conf.xml", "w") as fd:
fd.write(config)
return
@app.get("/graph/")
async def get_plotData():
plotData = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment