diff options
| author | Bobby <[email protected]> | 2025-12-19 18:01:24 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-12-19 18:01:24 +0530 |
| commit | b1bfec1ce2987d9fe0cc52e5ae9115977fdf8c24 (patch) | |
| tree | 7080b7dc97522ffe0837a1e0b2965489d7e67664 /router | |
| parent | 767297e28d47ee9cf3722054e41caa837f0e68d2 (diff) | |
| download | lain-b1bfec1ce2987d9fe0cc52e5ae9115977fdf8c24.tar.xz lain-b1bfec1ce2987d9fe0cc52e5ae9115977fdf8c24.zip | |
added utils, templates, routes, types, middleware, processors and a whole lot of things for a basic login page
Diffstat (limited to 'router')
| -rw-r--r-- | router/auth.go | 13 | ||||
| -rw-r--r-- | router/router.go | 10 |
2 files changed, 19 insertions, 4 deletions
diff --git a/router/auth.go b/router/auth.go new file mode 100644 index 0000000..8c13e37 --- /dev/null +++ b/router/auth.go @@ -0,0 +1,13 @@ +package router + +import ( + "lain/controllers" + "lain/types" + "lain/utils/urls" +) + +func init() { + urls.SetNamespace("auth") + + urls.Path(types.GET, "/login", controllers.LoginPage, "login") +} diff --git a/router/router.go b/router/router.go index 11015f9..e5c9303 100644 --- a/router/router.go +++ b/router/router.go @@ -1,11 +1,13 @@ package router -import "github.com/gofiber/fiber/v2" +import ( + "lain/utils/urls" + + "github.com/gofiber/fiber/v2" +) func Initialize(router *fiber.App) { router.Static("/static", "./static") - router.Get("/", func(c *fiber.Ctx) error { - return c.SendString("Lain Mail - Present day, present time") - }) + urls.Attach(router) } |
