diff options
| author | Bobby <[email protected]> | 2026-03-07 14:25:54 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-03-07 14:25:54 +0530 |
| commit | 41926c10ea2e8496ce4b528262f5047ccbe6f155 (patch) | |
| tree | 67ff5a27bb50faec368cf7ef38a1b1f2866459dd /pages | |
| parent | ed2a033d7c08e448f5c6fd035e2de8f51431b597 (diff) | |
| download | dove-41926c10ea2e8496ce4b528262f5047ccbe6f155.tar.xz dove-41926c10ea2e8496ce4b528262f5047ccbe6f155.zip | |
Implement authentication system with login/logout functionality and session management
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/dashboard.go | 11 | ||||
| -rw-r--r-- | pages/home.go | 17 |
2 files changed, 28 insertions, 0 deletions
diff --git a/pages/dashboard.go b/pages/dashboard.go new file mode 100644 index 0000000..323cd1f --- /dev/null +++ b/pages/dashboard.go @@ -0,0 +1,11 @@ +package pages + +import ( + "dove/utils/shortcuts" + + "github.com/gofiber/fiber/v2" +) + +func Dashboard(context *fiber.Ctx) error { + return shortcuts.Render(context, "dashboard", nil) +} diff --git a/pages/home.go b/pages/home.go new file mode 100644 index 0000000..cbf5a5d --- /dev/null +++ b/pages/home.go @@ -0,0 +1,17 @@ +package pages + +import ( + "dove/config" + "dove/utils/shortcuts" + + "github.com/gofiber/fiber/v2" +) + +func Home(context *fiber.Ctx) error { + switch config.AuthEnabled { + case true: + return shortcuts.Render(context, "auth/login", nil) + default: + return shortcuts.Render(context, "dashboard", nil) + } +} |
