Python · 883 bytes Raw Blame History
1 from django.urls import path
2 from . import views
3
4 urlpatterns = [
5 # Health check
6 path('health/', views.health_check, name='health_check'),
7
8 # Restaurant endpoints
9 path('restaurants/', views.RestaurantListCreateView.as_view(), name='restaurant_list_create'),
10 path('restaurants/nearby/', views.NearbyRestaurantsView.as_view(), name='restaurants_nearby'),
11 path('restaurants/<int:pk>/', views.RestaurantDetailView.as_view(), name='restaurant_detail'),
12 path('restaurants/<int:pk>/ratings/', views.RestaurantRatingView.as_view(), name='restaurant_ratings'),
13 path('restaurants/<int:pk>/toast-status/', views.RestaurantToastStatusView.as_view(), name='restaurant_toast_status'),
14
15 # Search
16 path('search/places/', views.SearchPlacesView.as_view(), name='search_places'),
17
18 # Utility
19 path('seed/', views.seed_data, name='seed_data'),
20 ]