| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2026-05-17 | Restructure repo: move Go server into player-server/ | Paul Buetow | |
| 2026-05-10 | refactor(api): replace all writeJSON 500 error patterns with handleError helper | Paul Buetow | |
| 2026-05-07 | Task 51: add API error helpers | Paul Buetow | |
| 2026-05-01 | Task 1: Create AuthService and route handleBootstrap/handleLogin through it | Paul Buetow | |
| Introduce service.AuthService interface with Bootstrap and Login methods, a concrete authService implementation, and a MockAuthService for testing. Wire AuthService into api.Server and update cmd/mediaplayer/main.go to use it. This removes direct store access from handleBootstrap and handleLogin, fixing the DIP violation. Sentinel errors (ErrAlreadyBootstrapped, ErrInvalidCredentials) are added to the service package so the API layer can map them to the correct HTTP status codes without leaking DB details. Files created: - internal/service/auth.go Files modified: - internal/service/service.go - internal/service/media.go - internal/service/mock.go - internal/repository/repository.go - internal/repository/mock.go - internal/api/server.go - internal/api/handlers_auth.go - internal/api/handlers_test.go - internal/api/handlers_more_test.go - cmd/mediaplayer/main.go | |||
| 2026-05-01 | refactor(api): split monolithic handlers.go into domain-specific files (task 3) | Paul Buetow | |
| Split internal/api/handlers.go (1045 lines) to improve KISS/SRP: - handlers_auth.go – bootstrap, login, logout, health, session cookies - handlers_media.go – sets, media CRUD, tags, favorites, notes, progress - handlers_share.go – create/list/revoke shares, share page, share stream - handlers_admin.go – trash, rescan, users, permissions - handlers_file.go – stream, download, thumbnail, regenerate thumbnail Shared helpers (writeJSON, readJSON, pathID, serveFileResult, mimeTypeForFilename, etc.) remain in handlers.go. All tests pass: go test ./... -race -cover. | |||
