From 303e51f53e5bb76a4787ca84b1b9d0647e1f84b4 Mon Sep 17 00:00:00 2001 From: yequari Date: Sun, 23 Mar 2025 14:53:13 -0700 Subject: [PATCH] fix website creation event trigger --- cmd/web/handlers_website.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/web/handlers_website.go b/cmd/web/handlers_website.go index ac3e02d..833e0b2 100644 --- a/cmd/web/handlers_website.go +++ b/cmd/web/handlers_website.go @@ -87,6 +87,9 @@ func (app *application) getWebsiteList(w http.ResponseWriter, r *http.Request) { app.serverError(w, r, err) return } + if r.Header.Get("HX-Request") == "true" { + w.Header().Add("HX-Trigger", "newWebsite") + } data := app.newCommonData(r) views.WebsiteList("My Websites", data, websites).Render(r.Context(), w) }