Added some notes on functions I may no longer need.

This commit is contained in:
2026-04-29 09:19:19 +02:00
parent e5537a76d3
commit 502b2abb2b
2 changed files with 13 additions and 5 deletions
+6 -5
View File
@@ -13,6 +13,7 @@ func (s *Server) setupRoutes() *chi.Mux {
router.Use(middleware.Logger)
router.Use(middleware.Recoverer)
// TODO: Not sure this is needed right now
// Setup basic file server nothing fancy
router.Handle("/static/*", http.StripPrefix("/static", http.FileServer(http.Dir("static"))))
@@ -22,16 +23,16 @@ func (s *Server) setupRoutes() *chi.Mux {
router.Post("/register", s.handleRegister())
router.Post("/login", s.handleLogin())
router.Post("/logout", s.handleLogout())
// public pages
r.Get("/", s.handleHome())
})
// User routes
// Private routes
router.Group(func(r chi.Router) {
// Requires log in
r.Use(s.hasAuth)
router.Mount("/users", s.userRoutes())
// TODO add authenicated routes here
// r.Get("/", s.handleHome())
// router.Mount("/users", s.userRoutes())
})
return router