WebHost: add yaml checker to sitemap and drop "mystery", as we've been doing in various places (#421)

This commit is contained in:
Fabian Dill 2022-04-05 15:17:47 +02:00 committed by GitHub
parent 30c447b9f3
commit d32d268d97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -18,7 +18,7 @@
<li><a href="/">Homepage</a></li>
<li><a href="/uploads">Host Game Page</a></li>
<li><a href="/datapackage">Raw Data Package</a></li>
<li><a href="/mysterycheck">Settings Validator</a></li>
<li><a href="{{ url_for('check')}}">Settings Validator</a></li>
<li><a href="/sitemap">Site Map</a></li>
<li><a href="/start-playing">Start Playing</a></li>
<li><a href="/games">Supported Games Page</a></li>