summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-04-17 14:43:01 -0600
committermo khan <mo@mokhan.ca>2025-04-17 14:43:01 -0600
commit1a1da99c2bde90bfd0cb78ddca5276deed10bdc5 (patch)
tree6da1e0eaa16e8e2d89ef29d6654bb953a2309e81 /app/controllers/dashboard
parente3eeba19f090f38712b4720e2f928d503f0d92d2 (diff)
refactor: introduce api to parse id token from multiple locations
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/controller.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/controllers/dashboard/controller.go b/app/controllers/dashboard/controller.go
index 184a8ed..b0477ba 100644
--- a/app/controllers/dashboard/controller.go
+++ b/app/controllers/dashboard/controller.go
@@ -5,6 +5,7 @@ import (
"net/http"
"github.com/xlgmokha/x/pkg/x"
+ "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/domain"
"gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/key"
)
@@ -60,11 +61,13 @@ func (c *Controller) Show(w http.ResponseWriter, r *http.Request) {
t := x.Must(template.New("show").Parse(tpl))
data := struct {
- Title string
- Sparkles []string
+ Title string
+ CurrentUser *domain.User
+ Sparkles []string
}{
- Title: "SparkleLab",
- Sparkles: []string{},
+ Title: "SparkleLab",
+ CurrentUser: currentUser,
+ Sparkles: []string{},
}
t.Execute(w, data)
}