From f3abcc365b46e2776a6f0da330a10493eb58a07b Mon Sep 17 00:00:00 2001 From: mo khan Date: Tue, 22 Apr 2025 17:24:04 -0600 Subject: refactor: convert id token to user in mapper --- app/controllers/dashboard/controller.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/controllers/dashboard/controller.go') diff --git a/app/controllers/dashboard/controller.go b/app/controllers/dashboard/controller.go index 106666b..02238bb 100644 --- a/app/controllers/dashboard/controller.go +++ b/app/controllers/dashboard/controller.go @@ -31,10 +31,8 @@ func (c *Controller) Show(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) w.Header().Add("Content-Type", "text/html") - if err := views.Render(w, "dashboard/show", &ViewDashboardDTO{ - CurrentUser: currentUser, - Sparkles: []string{}, - }); err != nil { + dto := &ViewDashboardDTO{CurrentUser: currentUser} + if err := views.Render(w, "dashboard/show", dto); err != nil { log.WithFields(r.Context(), log.Fields{"error": err}) w.WriteHeader(http.StatusInternalServerError) return -- cgit v1.2.3