Checking to see if a user is logged in, and logging a user our

This commit is contained in:
2024-07-22 10:00:17 +02:00
parent a0853cf880
commit 96f81418ec
5 changed files with 26 additions and 9 deletions

View File

@ -32,6 +32,7 @@ func routes(app *config.AppConfig) http.Handler {
mux.Get("/book-room", handlers.Repo.BookRoom)
mux.Get("/user/login", handlers.Repo.ShowLogin)
mux.Post("/user/login", handlers.Repo.PostShowLogin)
mux.Get("/user/logout", handlers.Repo.Logout)
fileServer := http.FileServer(http.Dir("./static/"))
mux.Handle("/static/*", http.StripPrefix("/static", fileServer))