1 Commits

Author SHA1 Message Date
71bf8978ac Eingabemaske funktioniert soweit 2023-10-05 16:50:23 +02:00

View File

@ -34,7 +34,7 @@ func main() {
var b Briefing
mux := http.NewServeMux()
i, j = 1, 1
i = 1
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static/"))))
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
@ -51,8 +51,7 @@ func main() {
b.Time = r.PostFormValue("time")
b.State = r.PostFormValue("state")
b.Location = r.PostFormValue("location")
for ; j <= i; j++ {
for j = 1; j <= i; j++ {
b.Participants = append(b.Participants, Participant{
ID: j,
Person: Person{
@ -62,6 +61,7 @@ func main() {
Company: r.PostFormValue(("participant-company-" + fmt.Sprint(j))),
})
}
fmt.Println(b)
})
log.Fatalln(http.ListenAndServe(":8080", mux))