From 339c8d8a0bb5b859f2458a56127aba44be4d8c72 Mon Sep 17 00:00:00 2001 From: Wessie Date: Wed, 19 Jun 2024 21:33:39 +0100 Subject: [PATCH] website/admin: template reload now does a full page reload --- website/admin/home.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/website/admin/home.go b/website/admin/home.go index 63d3738..0715d72 100644 --- a/website/admin/home.go +++ b/website/admin/home.go @@ -61,11 +61,16 @@ func (TemplateReloadInput) TemplateName() string { func (s *State) PostReloadTemplates(w http.ResponseWriter, r *http.Request) { err := s.Templates.Reload() - err = s.TemplateExecutor.Execute(w, r, TemplateReloadInput{ + + input := NewHomeInput(r, s.Daypass) + input.TemplateReload = TemplateReloadInput{ Reloaded: err == nil, Error: err, - }) + } + + err = s.TemplateExecutor.Execute(w, r, input) if err != nil { s.errorHandler(w, r, err, "failed to reload templates") + return } }