*DB.ReadAll() hinzugefügt

This commit is contained in:
2023-10-07 17:22:55 +02:00
parent b13eba8008
commit 8ae3019b9c
3 changed files with 28 additions and 3 deletions

View File

@ -10,14 +10,14 @@ import (
func DisplayForm(i *int64) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
template.Must(template.ParseFiles("templates/index.html")).Execute(w, i)
template.Must(template.ParseFiles("templates/form.html")).Execute(w, i)
}
}
func AddParticipant(i *int64) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
*i++
template.Must(template.ParseFiles("templates/index.html", "templates/participant.html")).ExecuteTemplate(w, "participant", i)
template.Must(template.ParseFiles("templates/form.html", "templates/participant.html")).ExecuteTemplate(w, "participant", i)
}
}