Merge branch 'master' of https://github.com/berserker66/MultiWorld-Utilities
This commit is contained in:
commit
09ef90fd16
|
@ -64,7 +64,7 @@ def generate_api():
|
||||||
if type(options) == str:
|
if type(options) == str:
|
||||||
return {"text": options}, 400
|
return {"text": options}, 400
|
||||||
if "race" in request.form:
|
if "race" in request.form:
|
||||||
race = bool(request.form["race"])
|
race = bool(0 if request.form["race"] in {"false"} else int(request.form["race"]))
|
||||||
|
|
||||||
json_data = request.get_json()
|
json_data = request.get_json()
|
||||||
if json_data:
|
if json_data:
|
||||||
|
@ -72,7 +72,7 @@ def generate_api():
|
||||||
# example: options = {"player1weights" : {<weightsdata>}}
|
# example: options = {"player1weights" : {<weightsdata>}}
|
||||||
options = json_data["weights"]
|
options = json_data["weights"]
|
||||||
if "race" in json_data:
|
if "race" in json_data:
|
||||||
race = bool(json_data["race"])
|
race = bool(0 if json_data["race"] in {"false"} else int(json_data["race"]))
|
||||||
if not options:
|
if not options:
|
||||||
return {"text": "No options found. Expected file attachment or json weights."
|
return {"text": "No options found. Expected file attachment or json weights."
|
||||||
}, 400
|
}, 400
|
||||||
|
|
Loading…
Reference in New Issue