cml04-mediciones/internal/handlers/vistas.go

21 lines
482 B
Go
Raw Normal View History

2024-08-20 09:11:15 +02:00
package handlers
import (
"html/template"
"net/http"
"git.espin.casa/albert/cml04-mediciones/internal/client"
"github.com/julienschmidt/httprouter"
)
func VistasGetHandler(client client.IMediciones) httprouter.Handle {
return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
t, _ := template.ParseFiles("templates/view.html")
err := t.Execute(w, nil)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}
}