templates for
This commit is contained in:
67
main.go
67
main.go
@@ -205,6 +205,62 @@ func (s *Server) ListPrivate(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w, "Hallo %s - hier deine persönlichen Daten", user)*/
|
||||
}
|
||||
|
||||
func (s *Server) XcontactPublic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XcontactPrivate(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XdepartmentPublic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XdepartmentPrivate(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XroomPublic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XroomPrivate(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XlocationPublic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XlocationPrivate(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XkeywordPublic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XkeywordPrivate(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XkwbctPublic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XkwbctPrivate(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XctbkwPublic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
func (s *Server) XctbkwPrivate(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
}
|
||||
|
||||
var CFG Config
|
||||
var DB *sql.DB
|
||||
|
||||
@@ -285,10 +341,13 @@ func main() {
|
||||
// Handler für /
|
||||
|
||||
mux.Handle("/", srv.authAware(false, http.HandlerFunc(srv.ListPublic), http.HandlerFunc(srv.ListPrivate)))
|
||||
|
||||
/*mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
tplFull.ExecuteTemplate(w, "layout", nil)
|
||||
})*/
|
||||
mux.Handle("/htmx/contact", srv.authAware(false, http.HandlerFunc(srv.XcontactPublic), http.HandlerFunc(srv.XcontactPrivate)))
|
||||
mux.Handle("/htmx/department", srv.authAware(false, http.HandlerFunc(srv.XdepartmentPublic), http.HandlerFunc(srv.XdepartmentPrivate)))
|
||||
mux.Handle("/htmx/room", srv.authAware(false, http.HandlerFunc(srv.XroomPublic), http.HandlerFunc(srv.XroomPrivate)))
|
||||
mux.Handle("/htmx/location", srv.authAware(false, http.HandlerFunc(srv.XlocationPublic), http.HandlerFunc(srv.XlocationPrivate)))
|
||||
mux.Handle("/htmx/keyword", srv.authAware(false, http.HandlerFunc(srv.XkeywordPublic), http.HandlerFunc(srv.XkeywordPrivate)))
|
||||
mux.Handle("/htmx/keywordbycontact", srv.authAware(false, http.HandlerFunc(srv.XkwbctPublic), http.HandlerFunc(srv.XkwbctPrivate)))
|
||||
mux.Handle("/htmx/contactbykeyword", srv.authAware(false, http.HandlerFunc(srv.XctbkwPublic), http.HandlerFunc(srv.XctbkwPrivate)))
|
||||
|
||||
mux.HandleFunc("/htmx/contact", func(w http.ResponseWriter, r *http.Request) {
|
||||
if err := r.ParseForm(); err != nil {
|
||||
|
Reference in New Issue
Block a user