21 lines
482 B
Go
21 lines
482 B
Go
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
|
|
}
|
|
}
|
|
}
|