mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-03-14 10:44:13 +00:00
Changed return status for apply endpoint
This commit is contained in:
parent
b96bfd755d
commit
e62fc24644
1 changed files with 3 additions and 2 deletions
5
main.py
5
main.py
|
@ -61,7 +61,9 @@ def rollbackSystem():
|
|||
def upgradeSystem():
|
||||
upgradeResult = subprocess.Popen(["nixos-rebuild","switch","--upgrade"])
|
||||
upgradeResult.communicate()[0]
|
||||
return jsonify(upgradeResult.returncode)
|
||||
return jsonify(
|
||||
status=upgradeResult.returncode
|
||||
)
|
||||
|
||||
|
||||
@app.route("/createUser", methods=["POST"])
|
||||
|
@ -92,7 +94,6 @@ def createUser():
|
|||
hashedPassword = \"{1}\";
|
||||
}};
|
||||
#end
|
||||
|
||||
""".format(request.headers.get("X-User"), request.headers.get("X-Password"))
|
||||
|
||||
for line in fileContent:
|
||||
|
|
Loading…
Add table
Reference in a new issue