mirror of
https://github.com/airlabspl/uptimemonitor.git
synced 2025-11-17 06:14:12 +01:00
version build
This commit is contained in:
@@ -5,13 +5,15 @@ import (
|
||||
"net/http"
|
||||
"uptimemonitor"
|
||||
"uptimemonitor/html"
|
||||
"uptimemonitor/pkg/version"
|
||||
)
|
||||
|
||||
func (h *Handler) HomePage() http.HandlerFunc {
|
||||
tmpl := template.Must(template.ParseFS(html.FS, "layout.html", "app.html", "home.html"))
|
||||
|
||||
type data struct {
|
||||
User uptimemonitor.User
|
||||
Version string
|
||||
User uptimemonitor.User
|
||||
}
|
||||
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -22,7 +24,8 @@ func (h *Handler) HomePage() http.HandlerFunc {
|
||||
}
|
||||
|
||||
tmpl.Execute(w, data{
|
||||
User: getUserFromRequest(r),
|
||||
Version: version.Version,
|
||||
User: getUserFromRequest(r),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user