This commit is contained in:
lbenedar
2026-03-06 17:12:53 +03:00
parent 79d465bd7b
commit ec5ef9a5c1
3 changed files with 61 additions and 19 deletions

View File

@@ -19,6 +19,8 @@ func (app *application) routes() http.Handler {
fileServer := http.FileServer(http.FS(ui.Files))
router.Handler(http.MethodGet, "/static/*filepath", fileServer)
router.HandlerFunc(http.MethodGet, "/ping", ping)
dynamic := alice.New(app.sessionManager.LoadAndSave, noSurf, app.authenticate)
router.Handler(http.MethodGet, "/", dynamic.ThenFunc(app.home))