summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-04-22 17:24:04 -0600
committermo khan <mo@mokhan.ca>2025-04-22 17:24:04 -0600
commitf3abcc365b46e2776a6f0da330a10493eb58a07b (patch)
treeb77b92b7c2ac71ff87ba0d65b707447731f7d575 /app
parenta4c1a145950739ac307eb7607ccedd7b10584d90 (diff)
refactor: convert id token to user in mapper
Diffstat (limited to 'app')
-rw-r--r--app/controllers/dashboard/controller.go6
-rw-r--r--app/controllers/dashboard/dto.go2
2 files changed, 2 insertions, 6 deletions
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
diff --git a/app/controllers/dashboard/dto.go b/app/controllers/dashboard/dto.go
index 4243adc..ff587ae 100644
--- a/app/controllers/dashboard/dto.go
+++ b/app/controllers/dashboard/dto.go
@@ -4,6 +4,4 @@ import "gitlab.com/gitlab-org/software-supply-chain-security/authorization/spark
type ViewDashboardDTO struct {
CurrentUser *domain.User
- Sparkles []string
- Title string
}