shelves/backend/routes/home.go
2024-11-15 15:05:06 -05:00

21 lines
361 B
Go

package routes
import (
"net/http"
"shelves/backend/httpx"
"shelves/backend/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))
}