feat(webui): bootstrap session handling and login process
This commit is contained in:
parent
63e2b1b09d
commit
6e069484cb
18 changed files with 447 additions and 1 deletions
|
@ -10,5 +10,11 @@ func addRoutes(
|
|||
mux *http.ServeMux,
|
||||
db *database.DB,
|
||||
) {
|
||||
session := sessionsMiddleware(db)
|
||||
requireLogin := loginMiddleware(db)
|
||||
mux.Handle("GET /healthz", handleHealthz())
|
||||
mux.Handle("GET /login", session(handleLoginGET()))
|
||||
mux.Handle("POST /login", session(handleLoginPOST(db)))
|
||||
mux.Handle("GET /static/", cache(http.FileServer(http.FS(staticFS))))
|
||||
mux.Handle("GET /", session(requireLogin(handleIndexGET())))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue