summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/handlers/handlers_test.go42
-rw-r--r--internal/handlers/settings.go22
-rw-r--r--internal/models/atom.go2
3 files changed, 0 insertions, 66 deletions
diff --git a/internal/handlers/handlers_test.go b/internal/handlers/handlers_test.go
index 1f66378..d16c7cf 100644
--- a/internal/handlers/handlers_test.go
+++ b/internal/handlers/handlers_test.go
@@ -1343,48 +1343,6 @@ func TestHandleToggleSourceConfig_MissingFields(t *testing.T) {
}
}
-func TestHandleGetSourceOptions(t *testing.T) {
- h, cleanup := setupTestHandler(t)
- defer cleanup()
-
- // Create source configs
- _ = h.store.SyncSourceConfigs("trello", "board", []models.SourceConfig{
- {Source: "trello", ItemType: "board", ItemID: "board1", ItemName: "Board 1"},
- {Source: "trello", ItemType: "board", ItemID: "board2", ItemName: "Board 2"},
- })
-
- req := httptest.NewRequest("GET", "/settings/source/trello", nil)
- rctx := chi.NewRouteContext()
- rctx.URLParams.Add("source", "trello")
- req = req.WithContext(context.WithValue(req.Context(), chi.RouteCtxKey, rctx))
-
- w := httptest.NewRecorder()
-
- h.HandleGetSourceOptions(w, req)
-
- // May fail if template not found, which is acceptable in test
- if w.Code != http.StatusOK && w.Code != http.StatusInternalServerError {
- t.Errorf("Expected status 200 or 500, got %d", w.Code)
- }
-}
-
-func TestHandleGetSourceOptions_MissingSource(t *testing.T) {
- h, cleanup := setupTestHandler(t)
- defer cleanup()
-
- req := httptest.NewRequest("GET", "/settings/source/", nil)
- rctx := chi.NewRouteContext()
- req = req.WithContext(context.WithValue(req.Context(), chi.RouteCtxKey, rctx))
-
- w := httptest.NewRecorder()
-
- h.HandleGetSourceOptions(w, req)
-
- if w.Code != http.StatusBadRequest {
- t.Errorf("Expected status 400, got %d", w.Code)
- }
-}
-
// mockTrelloClientWithBoards returns mock boards
type mockTrelloClientWithBoards struct {
mockTrelloClient
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")
diff --git a/internal/models/atom.go b/internal/models/atom.go
index 9f40de6..21d30a6 100644
--- a/internal/models/atom.go
+++ b/internal/models/atom.go
@@ -10,7 +10,6 @@ type AtomSource string
const (
SourceTrello AtomSource = "trello"
- SourceMeal AtomSource = "plantoeat"
SourceGTasks AtomSource = "gtasks"
SourceClaudomator AtomSource = "claudomator"
SourceDoot AtomSource = "doot"
@@ -20,7 +19,6 @@ type AtomType string
const (
TypeTask AtomType = "task"
- TypeMeal AtomType = "meal"
)
// Atom represents a unified unit of work or information