Skip to content

Commit

Permalink
order of urls matters maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanB committed Sep 23, 2024
1 parent 9ebbc2c commit a8cbe5c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ranked/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@

urlpatterns = [
path('', views.ranked_api, name='ranked_api'),
path('all-users/', views.get_all_users, name='get_all_users'), # Changed from 'users/' to 'all-users/'
path('all-users/', views.get_all_users, name='get_all_users'),
path('player/<str:player_id>/', views.get_player, name='get_player'),

# Place specific routes before generic ones
path('change-match-game-modes/', views.change_match_game_modes, name='change_match_game_modes'),

path('<str:game_mode_code>/', views.get_game_mode, name='get_game_mode'),
path('<str:game_mode_code>/player/<str:player_id>/', views.get_player_stats, name='get_player_stats'),
path('<str:game_mode_code>/player/<str:player_id>/history/', views.get_player_elo_history, name='get_player_elo_history'),
path('<str:game_mode_code>/match/', views.post_match_result, name='post_match_result'),
path('<str:game_mode_code>/match/edit/', views.edit_match_result, name='edit_match_result'),
path('leaderboard/<str:game_mode_code>/', views.get_leaderboard, name='get_leaderboard'),
path('<str:game_mode_code>/players/', views.get_valid_players, name='get_valid_players'),
path('change-match-game-modes/', views.change_match_game_modes, name='change_match_game_modes'),
]

0 comments on commit a8cbe5c

Please sign in to comment.