fix: Use hooks for handling /desk and /app routes
No need for random if statements, use the framework!
This commit is contained in:
parent
e9be875b61
commit
46d2ede2e3
2 changed files with 5 additions and 7 deletions
|
|
@ -58,6 +58,11 @@ website_route_rules = [
|
|||
{"from_route": "/kb/<category>", "to_route": "Help Article"},
|
||||
{"from_route": "/newsletters", "to_route": "Newsletter"},
|
||||
{"from_route": "/profile", "to_route": "me"},
|
||||
{"from_route": "/app/<path:app_path>", "to_route": "app"},
|
||||
]
|
||||
|
||||
website_redirects = [
|
||||
{"source": r"/desk(.*)", "target": r"/app\1"},
|
||||
]
|
||||
|
||||
base_template = "templates/base.html"
|
||||
|
|
|
|||
|
|
@ -252,13 +252,6 @@ def resolve_path(path):
|
|||
if path != "index":
|
||||
path = resolve_from_map(path)
|
||||
|
||||
if path.startswith("app"):
|
||||
path = "app"
|
||||
|
||||
# to keep backward compatibility
|
||||
if path.startswith("desk"):
|
||||
path = "app"
|
||||
|
||||
return path
|
||||
|
||||
def resolve_from_map(path):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue