- Created BaseService with common patterns (cache, db, auth) - Created PlayerService with CRUD, search, filtering - Created TeamService with CRUD, roster management - Refactored players.py router to use PlayerService (~60% shorter) - Refactored teams.py router to use TeamService (~75% shorter) Benefits: - Business logic isolated in services - Easy to unit test - Consistent error handling - Reusable across endpoints |
||
|---|---|---|
| .. | ||
| routers_v3 | ||
| services | ||
| __init__.py | ||
| db_engine.py | ||
| dependencies.py | ||
| main.py | ||