Testing a new UI

This commit is contained in:
Mukhtar Akere
2025-07-09 20:08:09 +01:00
parent dba5604d79
commit c72867ff57
25 changed files with 5826 additions and 3287 deletions
+8
View File
@@ -2,12 +2,20 @@ package web
import (
"github.com/go-chi/chi/v5"
"io/fs"
"net/http"
)
func (wb *Web) Routes() http.Handler {
r := chi.NewRouter()
staticFS, err := fs.Sub(content, "assets")
if err != nil {
panic(err)
}
r.Handle("/assets/*", http.StripPrefix("/assets/", http.FileServer(http.FS(staticFS))))
r.Get("/login", wb.LoginHandler)
r.Post("/login", wb.LoginHandler)
r.Get("/register", wb.RegisterHandler)