diff options
| author | Bobby <[email protected]> | 2026-02-11 14:02:58 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-02-11 14:02:58 +0530 |
| commit | d87e08e0fc5911b2ff40604944448e1f0aaa31b7 (patch) | |
| tree | d64dba5b796ad39cb0514293cfd29826b66b8c7c /router/base.go | |
| parent | 2c567dd96712a887b42cf4df3bdaa9f5f2b51a43 (diff) | |
| download | cafe-d87e08e0fc5911b2ff40604944448e1f0aaa31b7.tar.xz cafe-d87e08e0fc5911b2ff40604944448e1f0aaa31b7.zip | |
Implement authentication flow with middleware and controllers, add OpenID discovery URL to server config
Diffstat (limited to 'router/base.go')
| -rw-r--r-- | router/base.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/router/base.go b/router/base.go index aaeaad3..6c66c7b 100644 --- a/router/base.go +++ b/router/base.go @@ -1,17 +1,14 @@ package router import ( + "cafe/controllers" "cafe/types" - "cafe/utils/shortcuts" + "cafe/utils/auth" "cafe/utils/urls" - - "github.com/gofiber/fiber/v2" ) func init() { urls.SetNamespace("") - urls.Path(types.GET, "/", func(c *fiber.Ctx) error { - return shortcuts.Render(c, "pages/main", fiber.Map{}) - }, "home") + urls.Path(types.GET, "/", auth.RequireAuthentication(controllers.MainHall), "mainHall") } |
