mirror of
https://github.com/grafana/grafana.git
synced 2026-08-26 21:37:31 -05:00
Working on login user name state
This commit is contained in:
+7
-1
@@ -58,7 +58,13 @@ func (self *HttpServer) ListenAndServe() {
|
||||
}
|
||||
|
||||
func (self *HttpServer) index(c *gin.Context) {
|
||||
c.HTML(200, "index.html", &indexViewModel{title: "hello from go"})
|
||||
viewModel := &IndexDto{}
|
||||
login, _ := c.Get("login")
|
||||
if login != nil {
|
||||
viewModel.User.Login = login.(string)
|
||||
}
|
||||
|
||||
c.HTML(200, "index.html", viewModel)
|
||||
}
|
||||
|
||||
func CacheHeadersMiddleware() gin.HandlerFunc {
|
||||
|
||||
Reference in New Issue
Block a user