diff options
author | 2020-12-14 17:53:10 +0000 | |
---|---|---|
committer | 2020-12-14 17:53:10 +0000 | |
commit | afc3596943db58b62a78f121310605696300f7fa (patch) | |
tree | f76bc6827a0fb9286414627d1537740a532e2de4 /backend/route_manager.py | |
parent | Restructure single response route (diff) | |
parent | Merge pull request #25 from python-discord/bugfix/route-collision (diff) |
Merge branch 'main' into ks123/single-response-route
Diffstat (limited to 'backend/route_manager.py')
-rw-r--r-- | backend/route_manager.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/route_manager.py b/backend/route_manager.py index 3d83ee7..25529eb 100644 --- a/backend/route_manager.py +++ b/backend/route_manager.py @@ -20,6 +20,9 @@ def construct_route_map_from_dict(route_dict: dict) -> list: else: route_map.append(Mount(mount, routes=construct_route_map_from_dict(item))) + # Order non-capturing routes before capturing routes + route_map.sort(key=lambda route: "{" in route.path) + return route_map |