aboutsummaryrefslogtreecommitdiff
path: root/pkg/handler/router.go
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-10-28 13:56:00 +0100
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-10-28 13:56:00 +0100
commitb9b6688c8751b3ff0fe89655683af48eff195501 (patch)
tree92b13cb955713a3cb7c213e0a9fd1159a488ecb7 /pkg/handler/router.go
parent6a3a7a85ef2f63e88a8c96aa3ab525ce843024f9 (diff)
downloadcerrado-b9b6688c8751b3ff0fe89655683af48eff195501.tar.gz
cerrado-b9b6688c8751b3ff0fe89655683af48eff195501.tar.bz2
cerrado-b9b6688c8751b3ff0fe89655683af48eff195501.zip
feat: Add skeleton login page
Diffstat (limited to 'pkg/handler/router.go')
-rw-r--r--pkg/handler/router.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/handler/router.go b/pkg/handler/router.go
index a2ac98a..32bd78a 100644
--- a/pkg/handler/router.go
+++ b/pkg/handler/router.go
@@ -6,6 +6,7 @@ import (
serverconfig "git.gabrielgio.me/cerrado/pkg/config"
"git.gabrielgio.me/cerrado/pkg/ext"
"git.gabrielgio.me/cerrado/pkg/handler/about"
+ "git.gabrielgio.me/cerrado/pkg/handler/auth"
"git.gabrielgio.me/cerrado/pkg/handler/git"
"git.gabrielgio.me/cerrado/pkg/handler/static"
"git.gabrielgio.me/cerrado/pkg/service"
@@ -21,6 +22,7 @@ func MountHandler(
var (
gitHandler = git.NewGitHandler(gitService, configRepo)
aboutHandler = about.NewAboutHandler(configRepo)
+ loginHandler = &auth.LoginHandler{}
)
staticHandler, err := static.ServeStaticHandler()
@@ -33,6 +35,7 @@ func MountHandler(
mux.AddMiddleware(ext.Log)
mux.HandleFunc("/static/{file}", staticHandler)
+ mux.HandleFunc("/login/{$}", loginHandler.Login)
mux.HandleFunc("/{name}/about/{$}", gitHandler.About)
mux.HandleFunc("/{name}/", gitHandler.Summary)
mux.HandleFunc("/{name}/refs/{$}", gitHandler.Refs)