Changed return status for apply endpoint

pull/2/head
Illia Chub 2021-07-07 19:01:32 +03:00
parent e62fc24644
commit 2795aa5fd3
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ def getPythonVersion():
def rebuildSystem():
rebuildResult = subprocess.Popen(["nixos-rebuild","switch"])
rebuildResult.communicate()[0]
return jsonify(rebuildResult.returncode)
return jsonify(
status=rebuildResult.returncode
)
@app.route("/rollback", methods=["GET"])