summaryrefslogtreecommitdiff
path: root/web/css
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-01 22:16:11 +0300
committerPaul Buetow <paul@buetow.org>2026-05-01 22:16:11 +0300
commitfeafe31716cdbac304dbcd0bce6fe7b205747f0a (patch)
tree646a3330be1090ee78cd64166b76cd221ec8f847 /web/css
parentaf29deb33ee25800976b7122236bf7895a5ff39e (diff)
Task 1: Create AuthService and route handleBootstrap/handleLogin through it
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
Diffstat (limited to 'web/css')
0 files changed, 0 insertions, 0 deletions