From c22a2877d55605a01db0255c476a76b52f63877f Mon Sep 17 00:00:00 2001 From: user Date: Thu, 26 Feb 2026 02:56:12 -0800 Subject: [PATCH] fix: pass CSRFField to dashboard template (closes #146) --- internal/handlers/handlers_test.go | 3 ++- templates/dashboard.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/handlers/handlers_test.go b/internal/handlers/handlers_test.go index 5cb6b9c..ce54f8f 100644 --- a/internal/handlers/handlers_test.go +++ b/internal/handlers/handlers_test.go @@ -419,7 +419,8 @@ func TestHandleDashboard(t *testing.T) { handler := testCtx.handlers.HandleDashboard() handler.ServeHTTP(recorder, request) - assert.Equal(t, http.StatusOK, recorder.Code, "dashboard should not 500 when apps exist (CSRFField must be accessible)") + assert.Equal(t, http.StatusOK, recorder.Code, + "dashboard should not 500 when apps exist (CSRFField must be accessible)") assert.Contains(t, recorder.Body.String(), "csrf-test-app") }) } diff --git a/templates/dashboard.html b/templates/dashboard.html index bf96b60..ff66e1c 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -69,7 +69,7 @@ View Edit
- {{ .CSRFField }} + {{ $.CSRFField }}