diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/user/routes.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/user/routes.go b/src/user/routes.go index f82cbdc..d3db728 100644 --- a/src/user/routes.go +++ b/src/user/routes.go @@ -99,6 +99,8 @@ func Authenticate(s *server.Server) http.HandlerFunc { func Show(s *server.Server) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - s.Ui.Render(w, "user/me", &struct{ Message, Username string }{"Congrats on getting this far!", session.Username()}) + session := r.Context().Value(sessions.SessionCtxKey("session")).(sessions.Session) + username := session.Get("username").(string) + s.Ui.Render(w, "user/me", &struct{ Message, Username string }{"Congrats on getting this far!", username}) } } |
