committing everything before round 2

This commit is contained in:
2026-08-12 14:14:09 -06:00
parent 27ae08690e
commit d14488d2f2
36 changed files with 562 additions and 55 deletions
+16
View File
@@ -0,0 +1,16 @@
package auth
import (
"net/http"
)
func requireAuth(next http.Handler) http.Handler {
return http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
if !sessionManager.Exists(request.Context(), "userID") {
http.Redirect(writer, request, "/login", http.StatusSeeOther)
return
}
next.ServeHTTP(writer, request)
})
}