shelves/routes/home.go
2024-11-15 15:25:29 -05:00

21 lines
345 B
Go

package routes
import (
"net/http"
"shelves/httpx"
"shelves/templates"
)
type homeTemplate struct {
templates.Page
}
func HomeGet(w http.ResponseWriter, req *http.Request) {
ctx := httpx.GetCtx(req)
tmpl := homeTemplate{
Page: templates.Page{SessionInfo: ctx.SessionInfo},
}
html(w, templates.Tmpls.HTML("home.tmpl.html", tmpl))
}