Commit Graph

15 Commits

Author SHA1 Message Date
root
9cdefa0ea6 refactor: Extract services layer for testability
- 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
2026-02-03 15:38:34 +00:00
Cal Corum
ef67b716e7 Fix teams endpoint to return results sorted by ID ascending
Added default order_by(Team.id.asc()) to get_teams endpoint to ensure
consistent ordering of results.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 13:30:50 -06:00
Cal Corum
7ce64a14ea Update caching rules & Add DELETE /draftlist 2025-10-25 20:15:56 -05:00
Cal Corum
a540a3e7f3 Add Redis Caching 2025-08-27 22:49:37 -05:00
Cal Corum
c05d00d60e DB Error Handling
Added error handling wrapper and fixed SQLite -> Postgres issues
2025-08-20 19:33:40 -05:00
Cal Corum
cd1321553e Logging updates 2024-12-16 09:03:23 -06:00
Cal Corum
4380c26319 Add Swagger support 2024-07-14 13:23:37 -05:00
Cal Corum
5fae0a30df Add query_to_csv 2023-09-15 00:03:23 -05:00
Cal Corum
5a5146c1cf Added logging to each router 2023-07-26 14:06:21 -05:00
Cal Corum
115a50c50a Typo fixes 2023-07-17 23:08:53 -05:00
Cal Corum
e687629485 Added /teams roster pull 2023-07-09 10:18:20 -05:00
Cal Corum
635baa91ad Bug fixes 2023-06-27 10:18:20 -05:00
Cal Corum
fb29f8bff3 Update with Sheets testing
Changed to /battingstats/totals
Updated some parameters to queries
2023-05-26 12:48:40 -05:00
Cal Corum
782804424d Fix relative package issues 2023-05-05 11:06:11 -05:00
Cal Corum
54b0485599 /standings, /teams, /transactions added 2023-03-22 15:56:10 -05:00