diff options
Diffstat (limited to 'modules/grils')
-rw-r--r-- | modules/grils/grils.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/grils/grils.go b/modules/grils/grils.go index fbe57e3..3663c7f 100644 --- a/modules/grils/grils.go +++ b/modules/grils/grils.go | |||
@@ -73,10 +73,7 @@ func (m *GrilsModule) FromID(id int) (*Gril, error) { | |||
73 | } | 73 | } |
74 | 74 | ||
75 | func (m *GrilsModule) viewGril(w http.ResponseWriter, r *http.Request, p httprouter.Params) { | 75 | func (m *GrilsModule) viewGril(w http.ResponseWriter, r *http.Request, p httprouter.Params) { |
76 | loggedIn := false | 76 | user, _ := m.g.Charakterin.GetUserFromRequest(r) |
77 | if user, _ := m.g.Charakterin.GetUserFromRequest(r); user != nil { | ||
78 | loggedIn = true | ||
79 | } | ||
80 | sid := p.ByName("id") | 77 | sid := p.ByName("id") |
81 | 78 | ||
82 | id, err := strconv.Atoi(sid) | 79 | id, err := strconv.Atoi(sid) |
@@ -91,8 +88,8 @@ func (m *GrilsModule) viewGril(w http.ResponseWriter, r *http.Request, p httprou | |||
91 | return | 88 | return |
92 | } | 89 | } |
93 | 90 | ||
94 | data := make(map[string]interface{}) | 91 | data := m.g.Renderer.DefaultData() |
95 | data["loggedIn"] = loggedIn | 92 | data["user"] = user |
96 | data["gril"] = gril | 93 | data["gril"] = gril |
97 | 94 | ||
98 | m.g.Renderer.RenderPage("gril", w, data) | 95 | m.g.Renderer.RenderPage("gril", w, data) |