From d32d268d975230ea557e624bc19c6571f3118425 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 5 Apr 2022 15:17:47 +0200 Subject: [PATCH] WebHost: add yaml checker to sitemap and drop "mystery", as we've been doing in various places (#421) --- WebHostLib/check.py | 10 +++++++--- WebHostLib/templates/siteMap.html | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/WebHostLib/check.py b/WebHostLib/check.py index 8b31ccc3..88ff509d 100644 --- a/WebHostLib/check.py +++ b/WebHostLib/check.py @@ -16,8 +16,8 @@ from Generate import roll_settings from Utils import parse_yaml -@app.route('/mysterycheck', methods=['GET', 'POST']) -def mysterycheck(): +@app.route('/check', methods=['GET', 'POST']) +def check(): if request.method == 'POST': # check if the post request has the file part if 'file' not in request.files: @@ -30,10 +30,14 @@ def mysterycheck(): else: results, _ = roll_options(options) return render_template("checkResult.html", results=results) - return render_template("check.html") +@app.route('/mysterycheck') +def mysterycheck(): + return redirect(url_for("check"), 301) + + def get_yaml_data(file) -> Union[Dict[str, str], str]: options = {} # if user does not select file, browser also diff --git a/WebHostLib/templates/siteMap.html b/WebHostLib/templates/siteMap.html index 536db518..dcce7727 100644 --- a/WebHostLib/templates/siteMap.html +++ b/WebHostLib/templates/siteMap.html @@ -18,7 +18,7 @@
  • Homepage
  • Host Game Page
  • Raw Data Package
  • -
  • Settings Validator
  • +
  • Settings Validator
  • Site Map
  • Start Playing
  • Supported Games Page