work on registration form

This commit is contained in:
2018-06-21 23:41:50 +02:00
parent ffa9fb3395
commit 39404caa6e
12 changed files with 193 additions and 100 deletions

View File

@@ -61,7 +61,7 @@ func (wc *WebController) serveTemplate(tpl string) httprouter.Handle {
r *http.Request,
p httprouter.Params,
) {
err := wc.templates.Get().ExecuteTemplate(w, tpl, nil)
err := wc.templates.Get().ExecuteTemplate(w, tpl, wc.newTemplateData(r))
if err != nil {
log.Error("Error executing template '%s': %s", tpl, err)
}
@@ -80,5 +80,5 @@ func (wc *WebController) serveFile(path string) httprouter.Handle {
func (wc *WebController) serveNotFound(w http.ResponseWriter, r *http.Request) {
log.Debug("Not Found: %s", r.URL)
wc.templates.Get().ExecuteTemplate(w, "error", nil)
wc.templates.Get().ExecuteTemplate(w, "error", wc.newTemplateData(r))
}