Added page protection for unauthorized access

This commit is contained in:
2025-02-14 19:51:40 +11:00
parent 5616b8a248
commit ea4dd2a407
8 changed files with 107 additions and 15 deletions

14
handlers/profile.go Normal file
View File

@@ -0,0 +1,14 @@
package handlers
import (
"net/http"
"projectreshoot/view/page"
)
func HandleProfile() http.Handler {
return http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
page.Profile().Render(r.Context(), w)
},
)
}