summaryrefslogtreecommitdiff
path: root/internal/api/handlers_admin.go
AgeCommit message (Collapse)Author
2026-05-17Restructure repo: move Go server into player-server/Paul Buetow
2026-05-10Move self-deletion guard from handler into AdminService (DeleteUser) to fix ↵Paul Buetow
SoC violation - Add ErrCannotDeleteSelf sentinel error in service layer. - Change DeleteUser signature to (ctx, callerID, id) across all layers. - Move self-deletion guard from handleDeleteUser handler into userAdminService.DeleteUser. - Update handleError to map ErrCannotDeleteSelf to 400 BadRequest. - Adjust all affected tests to use the new signature.
2026-05-10api: reject id==0 in handleDeleteUser to avoid 200 OK for invalid pathPaul Buetow
2026-05-10refactor(api): replace all writeJSON 500 error patterns with handleError helperPaul Buetow
2026-05-07Task 51: add API error helpersPaul Buetow
2026-05-02fix detached playback and scan progressPaul Buetow
2026-05-01refactor(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.