WebHost: add yaml checker to sitemap and drop "mystery", as we've been doing in various places (#421)
This commit is contained in:
parent
30c447b9f3
commit
d32d268d97
|
@ -16,8 +16,8 @@ from Generate import roll_settings
|
||||||
from Utils import parse_yaml
|
from Utils import parse_yaml
|
||||||
|
|
||||||
|
|
||||||
@app.route('/mysterycheck', methods=['GET', 'POST'])
|
@app.route('/check', methods=['GET', 'POST'])
|
||||||
def mysterycheck():
|
def check():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
# check if the post request has the file part
|
# check if the post request has the file part
|
||||||
if 'file' not in request.files:
|
if 'file' not in request.files:
|
||||||
|
@ -30,10 +30,14 @@ def mysterycheck():
|
||||||
else:
|
else:
|
||||||
results, _ = roll_options(options)
|
results, _ = roll_options(options)
|
||||||
return render_template("checkResult.html", results=results)
|
return render_template("checkResult.html", results=results)
|
||||||
|
|
||||||
return render_template("check.html")
|
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]:
|
def get_yaml_data(file) -> Union[Dict[str, str], str]:
|
||||||
options = {}
|
options = {}
|
||||||
# if user does not select file, browser also
|
# if user does not select file, browser also
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<li><a href="/">Homepage</a></li>
|
<li><a href="/">Homepage</a></li>
|
||||||
<li><a href="/uploads">Host Game Page</a></li>
|
<li><a href="/uploads">Host Game Page</a></li>
|
||||||
<li><a href="/datapackage">Raw Data Package</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="/sitemap">Site Map</a></li>
|
||||||
<li><a href="/start-playing">Start Playing</a></li>
|
<li><a href="/start-playing">Start Playing</a></li>
|
||||||
<li><a href="/games">Supported Games Page</a></li>
|
<li><a href="/games">Supported Games Page</a></li>
|
||||||
|
|
Loading…
Reference in New Issue