diff options
Diffstat (limited to 'internal/handlers/settings.go')
| -rw-r--r-- | internal/handlers/settings.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/internal/handlers/settings.go b/internal/handlers/settings.go index dc345db..28988b1 100644 --- a/internal/handlers/settings.go +++ b/internal/handlers/settings.go @@ -154,28 +154,6 @@ func (h *Handler) HandleToggleSourceConfig(w http.ResponseWriter, r *http.Reques json.NewEncoder(w).Encode(map[string]bool{"enabled": enabled}) } -// HandleGetSourceOptions returns available options for a source (HTMX partial) -func (h *Handler) HandleGetSourceOptions(w http.ResponseWriter, r *http.Request) { - source := chi.URLParam(r, "source") - if source == "" { - JSONError(w, http.StatusBadRequest, "Source required", nil) - return - } - - configs, err := h.store.GetSourceConfigsBySource(source) - if err != nil { - JSONError(w, http.StatusInternalServerError, "Failed to load configs", err) - return - } - - data := struct { - Source string - Configs []models.SourceConfig - }{source, configs} - - HTMLResponse(w, h.renderer, "settings-source-options", data) -} - // HandleToggleFeature toggles a feature flag func (h *Handler) HandleToggleFeature(w http.ResponseWriter, r *http.Request) { name, ok := requireFormValue(w, r, "name") |
