mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-02-05 02:15:19 -05:00
- Add new /profiles/ endpoint for listing user profiles - Support search by username/display name with ordering options - Include pagination with configurable page size (max 100) - Add comprehensive OpenAPI schema documentation - Refactor passkey authentication state management in MFA flow - Update URL routing and imports for new list_profiles view This enables user discovery, leaderboards, and friend-finding features with a publicly accessible, well-documented API endpoint.
82 lines
3.1 KiB
Python
82 lines
3.1 KiB
Python
"""Comprehensive URL routes for Rides domain (API v1).
|
|
|
|
This file exposes a maximal set of "full-fat" endpoints implemented in
|
|
`apps.api.v1.rides.views`. Endpoints are intentionally expansive (aliases,
|
|
bulk operations, action endpoints, analytics, import/export) so the backend
|
|
surface matches the frontend's expectations. Implementations for specific
|
|
actions (bulk, publish, export, import, recommendations) should be added
|
|
to the views module when business logic is available.
|
|
"""
|
|
|
|
from django.urls import include, path
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from .photo_views import RidePhotoViewSet
|
|
from .ride_model_views import GlobalRideModelDetailAPIView, GlobalRideModelListAPIView
|
|
from .views import (
|
|
CompanySearchAPIView,
|
|
DesignerListAPIView,
|
|
FilterOptionsAPIView,
|
|
HybridRideAPIView,
|
|
ManufacturerListAPIView,
|
|
RideDetailAPIView,
|
|
RideFilterMetadataAPIView,
|
|
RideImageSettingsAPIView,
|
|
RideListCreateAPIView,
|
|
RideModelSearchAPIView,
|
|
RideSearchSuggestionsAPIView,
|
|
)
|
|
|
|
# Create router for nested photo endpoints
|
|
router = DefaultRouter()
|
|
router.register(r"", RidePhotoViewSet, basename="ridephoto")
|
|
|
|
app_name = "api_v1_rides"
|
|
|
|
urlpatterns = [
|
|
# Core list/create endpoints
|
|
path("", RideListCreateAPIView.as_view(), name="ride-list-create"),
|
|
# Hybrid filtering endpoints
|
|
path("hybrid/", HybridRideAPIView.as_view(), name="ride-hybrid-filtering"),
|
|
path("hybrid/filter-metadata/", RideFilterMetadataAPIView.as_view(), name="ride-hybrid-filter-metadata"),
|
|
# Filter options
|
|
path("filter-options/", FilterOptionsAPIView.as_view(), name="ride-filter-options"),
|
|
# Global ride model endpoints - matches frontend's /rides/models/ expectation
|
|
path("models/", GlobalRideModelListAPIView.as_view(), name="ride-model-global-list"),
|
|
path("models/<int:pk>/", GlobalRideModelDetailAPIView.as_view(), name="ride-model-global-detail"),
|
|
# Autocomplete / suggestion endpoints
|
|
path(
|
|
"search/companies/",
|
|
CompanySearchAPIView.as_view(),
|
|
name="ride-search-companies",
|
|
),
|
|
path(
|
|
"search/ride-models/",
|
|
RideModelSearchAPIView.as_view(),
|
|
name="ride-search-ride-models",
|
|
),
|
|
path(
|
|
"search-suggestions/",
|
|
RideSearchSuggestionsAPIView.as_view(),
|
|
name="ride-search-suggestions",
|
|
),
|
|
# Manufacturer and Designer endpoints
|
|
path("manufacturers/", ManufacturerListAPIView.as_view(), name="manufacturer-list"),
|
|
path("designers/", DesignerListAPIView.as_view(), name="designer-list"),
|
|
# Ride model management endpoints - nested under rides/manufacturers
|
|
path(
|
|
"manufacturers/<slug:manufacturer_slug>/",
|
|
include("apps.api.v1.rides.manufacturers.urls"),
|
|
),
|
|
# Detail and action endpoints
|
|
path("<int:pk>/", RideDetailAPIView.as_view(), name="ride-detail"),
|
|
# Ride image settings endpoint
|
|
path(
|
|
"<int:pk>/image-settings/",
|
|
RideImageSettingsAPIView.as_view(),
|
|
name="ride-image-settings",
|
|
),
|
|
# Ride photo endpoints - domain-specific photo management
|
|
path("<int:ride_pk>/photos/", include(router.urls)),
|
|
]
|