Files
minstrel/internal/api/admin_cover_sources.go
T
bvandeusenandClaude Opus 5.5 17a9052acb
release / web (push) Successful in 1m16s
release / go (push) Successful in 1m49s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 3m56s
release / android (push) Successful in 4m8s
release / Build signed APK (push) Successful in 4m29s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 13s
release / Verify release artifacts (tag releases only) (push) Skipped
refactor(api): the cover-source and tag-source admin cards share their handlers (#8002)
admin_cover_sources.go and admin_tag_sources.go were the same list,
update and test handlers over two settings services, each with its own
copy of the response mapping. With both services now a
providers.Service, admin_provider_sources.go holds the handlers and wire
types once, and each family's routes pass their own service. The wire
shape is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:01:48 -05:00

24 lines
815 B
Go

package api
import (
"net/http"
)
// The cover-sources admin card: the shared provider-source handlers
// (admin_provider_sources.go) over the cover settings.
// handleListCoverSources implements GET /api/admin/cover-sources.
func (h *handlers) handleListCoverSources(w http.ResponseWriter, _ *http.Request) {
listProviderSources(w, h.coverSettings.Service)
}
// handleUpdateCoverSource implements PATCH /api/admin/cover-sources/{provider_id}.
func (h *handlers) handleUpdateCoverSource(w http.ResponseWriter, r *http.Request) {
h.updateProviderSource(w, r, h.coverSettings.Service)
}
// handleTestCoverSource implements POST /api/admin/cover-sources/{provider_id}/test.
func (h *handlers) handleTestCoverSource(w http.ResponseWriter, r *http.Request) {
testProviderSource(w, r, h.coverSettings.Service)
}