From 68abbca710fc7aa120b14174dda789073f0ff82a Mon Sep 17 00:00:00 2001 From: Jordan Olshevski Date: Tue, 18 Jun 2024 20:31:04 -0500 Subject: [PATCH] Fix UI --- internal/server/server.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/server/server.go b/internal/server/server.go index bdc266b..9c75c0c 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -120,10 +120,15 @@ func (s *Server) newProfileViewHandler() http.HandlerFunc { renderSystemError(w, "error while fetching user: %s", err) return } + extended, err := s.Keycloak.ExtendUser(r.Context(), user) + if err != nil { + renderSystemError(w, "error while extending user: %s", err) + return + } viewData := map[string]any{ "page": "profile", - "user": user, + "user": extended, "prices": payment.CalculateDiscounts(user, s.PriceCache.GetPrices()), "migratedAccount": user.LastPaypalTransactionTime != time.Time{}, "stripePending": etagString != "" && user.StripeETag < etag,