Login fully working (via HTMX and Cookies)

Moved code bits around for more Exported functions
Fixed JWT validation
This commit is contained in:
Caleb Gardner
2024-11-11 13:25:38 -06:00
parent e183eefee8
commit 8eb031c64f
4 changed files with 21 additions and 18 deletions
+3 -4
View File
@@ -147,13 +147,12 @@ func setupWebsite(mux *http.ServeMux) {
url, _ := url.Parse("https://localhost:30000")
mux.Handle("rpg.darkstorm.tech/", httputil.NewSingleHostReverseProxy(url))
}
edit := NewBlogEditor(blogApp, back)
mux.HandleFunc("GET /files/{w...}", filesRequest)
mux.HandleFunc("GET /portfolio", portfolioRequest)
mux.HandleFunc("GET /list", blogListHandle)
mux.HandleFunc("GET /login", edit.LoginPage)
mux.HandleFunc("GET /editor", edit.Editor)
mux.HandleFunc("POST /login", edit.TrueLogin)
mux.HandleFunc("GET /login", loginPageRequest)
mux.HandleFunc("GET /editor/", editorRequest)
mux.HandleFunc("POST /login", trueLoginRequest)
mux.HandleFunc("/", mainHandle)
}