From 7e5fdb684e4d5a2b7a2b50fa97564e5313fa07cf Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 21 Apr 2024 17:47:22 +0800 Subject: [PATCH] :bug: Fix index page is null --- pkg/server/ui/index.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/server/ui/index.go b/pkg/server/ui/index.go index 930525d..0e024e3 100644 --- a/pkg/server/ui/index.go +++ b/pkg/server/ui/index.go @@ -2,6 +2,7 @@ package ui import ( "fmt" + "git.solsynth.dev/hydrogen/passport/pkg/services" "github.com/gofiber/fiber/v2" ) @@ -25,6 +26,10 @@ func MapUserInterface(A *fiber.App, authFunc func(c *fiber.Ctx, overrides ...str pages := A.Group("/").Name("Pages") + pages.Get("/", func(c *fiber.Ctx) error { + return c.Redirect("/users/me") + }) + pages.Get("/sign-up", signupPage) pages.Get("/sign-in", signinPage) pages.Get("/mfa", mfaRequestPage)