cml04-falcon-ui/handlers/hbcp.go

21 lines
490 B
Go
Raw Permalink Normal View History

2024-10-05 18:43:25 +02:00
package handlers
import (
"net/http"
"text/template"
2024-10-06 06:12:43 +02:00
"git.espin.casa/albert/cml04-falcon-ui/storage"
2024-10-05 18:43:25 +02:00
"github.com/julienschmidt/httprouter"
)
2024-10-06 06:12:43 +02:00
func HBCPHandler(storage storage.Storager) httprouter.Handle {
2024-10-05 18:43:25 +02:00
return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
t, _ := template.ParseFiles("templates/base.html", "templates/hbcp.html")
err := t.Execute(w, nil)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}
}