MCPcopy Create free account
hub / github.com/PiSCSI/piscsi / config_save

Function config_save

python/web/src/web.py:492–503  ·  view source on GitHub ↗

Saves a config file to disk

()

Source from the content-addressed store, hash-verified

490@APP.route("/config/save", methods=["POST"])
491@login_required
492def config_save():
493 """
494 Saves a config file to disk
495 """
496 file_name = Path(request.form.get("name") + f".{CONFIG_FILE_SUFFIX}").name
497
498 process = file_cmd.write_config(file_name)
499 process = ReturnCodeMapper.add_msg(process)
500 if process["status"]:
501 return response(message=process["msg"])
502
503 return response(error=True, message=process["msg"])
504
505
506@APP.route("/config/action", methods=["POST"])

Callers

nothing calls this directly

Calls 3

responseFunction · 0.85
write_configMethod · 0.80
add_msgMethod · 0.80

Tested by

no test coverage detected