From dd567a156ba6ca85b1dda8955b6df427b87a14eb Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Fri, 15 May 2026 16:30:41 -0500 Subject: [PATCH] Update portal.go --- pkg/auth/portal.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/auth/portal.go b/pkg/auth/portal.go index 42ec3b6..98d2536 100644 --- a/pkg/auth/portal.go +++ b/pkg/auth/portal.go @@ -19,8 +19,15 @@ func PortalUser(c *fiber.Ctx) (*models.PortalUser, error) { if raw == nil { return nil, errors.New("no portal session") } - id, ok := raw.(uint) - if !ok { + var id uint + switch v := raw.(type) { + case uint: + id = v + case int64: + id = uint(v) + case float64: + id = uint(v) + default: log.Printf("[PORTAL SESSION] type assertion failed: %T", raw) return nil, errors.New("invalid portal session") }