WebHost: add spoiler level field to generate form

This commit is contained in:
Fabian Dill
2023-04-17 13:19:27 +02:00
committed by Fabian Dill
parent c8fb46a5e6
commit bf5c1cbbbf
4 changed files with 49 additions and 18 deletions

View File

@@ -48,9 +48,8 @@ def generate_api():
if len(options) > app.config["MAX_ROLL"]:
return {"text": "Max size of multiworld exceeded",
"detail": app.config["MAX_ROLL"]}, 409
meta = get_meta(meta_options_source)
meta["race"] = race
results, gen_options = roll_options(options, meta["plando_options"])
meta = get_meta(meta_options_source, race)
results, gen_options = roll_options(options, set(meta["plando_options"]))
if any(type(result) == str for result in results.values()):
return {"text": str(results),
"detail": results}, 400