Sprechstunden hinzufügen und durch einen E-Mail-Link bestätigen lassen

This commit is contained in:
Gonne 2022-09-05 17:55:08 +02:00
parent 369f4ebcec
commit 78af58a51d
18 changed files with 291 additions and 29 deletions

View file

@ -16,7 +16,6 @@ func (b *BaseHandler) GetByRoomHandler(w http.ResponseWriter, req *http.Request)
roomId, _ := strconv.Atoi(req.FormValue("raum"))
room, err := b.roomRepo.FindById(roomId)
if err != nil {
fmt.Println(err)
b.RootHandler(w, req)
return
}
@ -53,12 +52,12 @@ func (b *BaseHandler) writeTimetablePage(w http.ResponseWriter, req *http.Reques
tmpl, err := template.ParseFiles("templates/index.html")
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
w.Write([]byte(fmt.Sprintf("Template konnte nicht geparst werden : %s", string(err.Error()))))
w.Write([]byte(fmt.Sprintf("Template konnte nicht geparst werden : %s", err.Error())))
return
}
err = tmpl.Execute(w, data)
if err != nil {
w.Write([]byte(fmt.Sprintf("Template konnte nicht geparst werden : %s", string(err.Error()))))
w.Write([]byte(fmt.Sprintf("Template konnte nicht geparst werden : %s", err.Error())))
return
}
}