mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 03:11:15 -05:00
Add ride credits and top lists endpoints for API v1
- Implement CRUD operations for ride credits, allowing users to log rides, track counts, and view statistics. - Create endpoints for managing user-created ranked lists of parks, rides, or coasters with custom rankings and notes. - Introduce pagination for both ride credits and top lists. - Ensure proper authentication and authorization for modifying user-specific data. - Add serialization methods for ride credits and top lists to return structured data. - Include error handling and logging for better traceability of operations.
This commit is contained in:
@@ -15,6 +15,9 @@ from .endpoints.versioning import router as versioning_router
|
||||
from .endpoints.auth import router as auth_router
|
||||
from .endpoints.photos import router as photos_router
|
||||
from .endpoints.search import router as search_router
|
||||
from .endpoints.reviews import router as reviews_router
|
||||
from .endpoints.ride_credits import router as ride_credits_router
|
||||
from .endpoints.top_lists import router as top_lists_router
|
||||
|
||||
|
||||
# Create the main API instance
|
||||
@@ -107,6 +110,11 @@ api.add_router("", photos_router) # Photos endpoints include both /photos and e
|
||||
# Add search router
|
||||
api.add_router("/search", search_router)
|
||||
|
||||
# Add user interaction routers
|
||||
api.add_router("/reviews", reviews_router)
|
||||
api.add_router("/ride-credits", ride_credits_router)
|
||||
api.add_router("/top-lists", top_lists_router)
|
||||
|
||||
|
||||
# Health check endpoint
|
||||
@api.get("/health", tags=["System"], summary="Health check")
|
||||
|
||||
Reference in New Issue
Block a user