From 07ba815e8517ee2d3a5fa531361bbd09bdfcbaa7 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 20 Jan 2026 11:17:19 -1000 Subject: Remove Obsidian integration for public server deployment Obsidian relied on local filesystem access which is incompatible with public server deployment. This removes all Obsidian-related code including: - API client and interface - Store layer methods (SaveNotes, GetNotes, SearchNotes) - Handler methods and routes - UI tab and templates - Configuration fields - Related tests Co-Authored-By: Claude Opus 4.5 --- internal/handlers/handlers_test.go | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'internal/handlers/handlers_test.go') diff --git a/internal/handlers/handlers_test.go b/internal/handlers/handlers_test.go index 1aa72cc..6e9346a 100644 --- a/internal/handlers/handlers_test.go +++ b/internal/handlers/handlers_test.go @@ -353,41 +353,6 @@ func TestHandleRefresh(t *testing.T) { // The important thing is the handler doesn't error } -// TestHandleGetNotes tests the HandleGetNotes handler -func TestHandleGetNotes(t *testing.T) { - db, cleanup := setupTestDB(t) - defer cleanup() - - // Test with nil client should return empty array - cfg := &config.Config{ - CacheTTLMinutes: 5, - } - h := &Handler{ - store: db, - obsidianClient: nil, - config: cfg, - } - - req := httptest.NewRequest("GET", "/api/notes", nil) - w := httptest.NewRecorder() - - h.HandleGetNotes(w, req) - - if w.Code != http.StatusOK { - t.Errorf("Expected status 200, got %d", w.Code) - } - - var notes []models.Note - if err := json.NewDecoder(w.Body).Decode(¬es); err != nil { - t.Fatalf("Failed to decode response: %v", err) - } - - // Handler returns empty array when client is nil - if len(notes) != 0 { - t.Errorf("Expected 0 notes when client is nil, got %d", len(notes)) - } -} - // TestHandleGetMeals tests the HandleGetMeals handler func TestHandleGetMeals(t *testing.T) { db, cleanup := setupTestDB(t) -- cgit v1.2.3