mirror of
https://github.com/nkanaev/yarr.git
synced 2025-09-13 09:55:36 +00:00
provide settings prior to js rendering
This commit is contained in:
@@ -52,7 +52,10 @@ func (s *Server) handler() http.Handler {
|
||||
}
|
||||
|
||||
func (s *Server) handleIndex(c *router.Context) {
|
||||
c.HTML(http.StatusOK, assets.Template("index.html"), nil)
|
||||
c.HTML(http.StatusOK, assets.Template("index.html"), map[string]interface{} {
|
||||
"settings": s.db.GetSettings(),
|
||||
"authenticated": s.Username != "" && s.Password != "",
|
||||
})
|
||||
}
|
||||
|
||||
func (s *Server) handleStatic(c *router.Context) {
|
||||
|
Reference in New Issue
Block a user