mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
Fix regression on 404 redirects
This commit is contained in:

committed by
black-sliver

parent
d408f7cabc
commit
84c2d70d9a
@@ -87,6 +87,7 @@ def start_playing():
|
||||
@cache.cached()
|
||||
def game_info(game, lang):
|
||||
"""Game Info Pages"""
|
||||
try:
|
||||
theme = get_world_theme(game)
|
||||
secure_game_name = secure_filename(game)
|
||||
lang = secure_filename(lang)
|
||||
@@ -100,6 +101,8 @@ def game_info(game, lang):
|
||||
html_from_markdown=document,
|
||||
theme=theme,
|
||||
)
|
||||
except FileNotFoundError:
|
||||
return abort(404)
|
||||
|
||||
|
||||
@app.route('/games')
|
||||
@@ -112,6 +115,7 @@ def games():
|
||||
@app.route('/tutorial/<string:game>/<string:file>')
|
||||
@cache.cached()
|
||||
def tutorial(game: str, file: str):
|
||||
try:
|
||||
theme = get_world_theme(game)
|
||||
secure_game_name = secure_filename(game)
|
||||
file = secure_filename(file)
|
||||
@@ -125,6 +129,8 @@ def tutorial(game: str, file: str):
|
||||
html_from_markdown=document,
|
||||
theme=theme,
|
||||
)
|
||||
except FileNotFoundError:
|
||||
return abort(404)
|
||||
|
||||
|
||||
@app.route('/tutorial/')
|
||||
|
Reference in New Issue
Block a user