Phase 2: auth, session management, layout, PWA manifest
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"qbank/internal/auth"
|
||||
)
|
||||
|
||||
type HomeHandler struct {
|
||||
auth *auth.Manager
|
||||
render *Renderer
|
||||
}
|
||||
|
||||
func NewHomeHandler(a *auth.Manager, r *Renderer) *HomeHandler {
|
||||
return &HomeHandler{auth: a, render: r}
|
||||
}
|
||||
|
||||
func (h *HomeHandler) Handle(w http.ResponseWriter, r *http.Request) {
|
||||
h.render.Render(w, http.StatusOK, "home", BaseData(h.auth, r))
|
||||
}
|
||||
Reference in New Issue
Block a user