fix website creation event trigger

This commit is contained in:
yequari 2025-03-23 14:53:13 -07:00
parent e065d5630c
commit 303e51f53e

View File

@ -87,6 +87,9 @@ func (app *application) getWebsiteList(w http.ResponseWriter, r *http.Request) {
app.serverError(w, r, err) app.serverError(w, r, err)
return return
} }
if r.Header.Get("HX-Request") == "true" {
w.Header().Add("HX-Trigger", "newWebsite")
}
data := app.newCommonData(r) data := app.newCommonData(r)
views.WebsiteList("My Websites", data, websites).Render(r.Context(), w) views.WebsiteList("My Websites", data, websites).Render(r.Context(), w)
} }