- 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 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| base.py | ||
| player_service.py | ||
| team_service.py | ||